From: deraadt Date: Tue, 13 Oct 2015 16:30:55 +0000 (+0000) Subject: After the socket is open, the remainder is just io operations. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a3cebea439328f3b79e912aaf55c9f9bb39dd4cb;p=openbsd After the socket is open, the remainder is just io operations. Use pledge "stdio". --- diff --git a/usr.sbin/syslogc/syslogc.c b/usr.sbin/syslogc/syslogc.c index da49cc69253..eaf4d62d860 100644 --- a/usr.sbin/syslogc/syslogc.c +++ b/usr.sbin/syslogc/syslogc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogc.c,v 1.17 2014/11/26 18:34:52 millert Exp $ */ +/* $OpenBSD: syslogc.c,v 1.18 2015/10/13 16:30:55 deraadt Exp $ */ /* * Copyright (c) 2004 Damien Miller @@ -147,6 +147,9 @@ main(int argc, char **argv) if ((ctlf = fdopen(ctlsock, "r+")) == NULL) err(1, "fdopen"); + if (pledge("stdio", NULL) == -1) + err(1, "stdio"); + cc.version = htonl(CTL_VERSION); cc.cmd = htonl(cc.cmd); /* Send command */