diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-13 16:30:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-13 16:30:56 +0000 |
commit | 4d34f615f3f88a2212df122d162fcdb800dc10e5 (patch) | |
tree | bfe5ae150945e9a3c78df52a39c666e8dd5b3b71 /usr.sbin/syslogc/syslogc.c | |
parent | a78136412d6295ff02d35fa0b1a4c876b95da518 (diff) |
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 */ |