diff options
author | 2015-10-13 16:30:55 +0000 | |
---|---|---|
committer | 2015-10-13 16:30:55 +0000 | |
commit | a3cebea439328f3b79e912aaf55c9f9bb39dd4cb (patch) | |
tree | 7ddb32269e73a68aece77c24dd4b645ff6c5ec89 /usr.sbin/syslogc/syslogc.c | |
parent | Remove -b flag and let ping6 set the socket buffer size automatically (diff) | |
download | wireguard-openbsd-a3cebea439328f3b79e912aaf55c9f9bb39dd4cb.tar.xz wireguard-openbsd-a3cebea439328f3b79e912aaf55c9f9bb39dd4cb.zip |
After the socket is open, the remainder is just io operations.
Use pledge "stdio".
Diffstat (limited to 'usr.sbin/syslogc/syslogc.c')
-rw-r--r-- | usr.sbin/syslogc/syslogc.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 */ |