artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cf2cbb
)
After the socket is open, the remainder is just io operations.
author
deraadt
<deraadt@openbsd.org>
Tue, 13 Oct 2015 16:30:55 +0000
(16:30 +0000)
committer
deraadt
<deraadt@openbsd.org>
Tue, 13 Oct 2015 16:30:55 +0000
(16:30 +0000)
Use pledge "stdio".
usr.sbin/syslogc/syslogc.c
patch
|
blob
|
history
diff --git
a/usr.sbin/syslogc/syslogc.c
b/usr.sbin/syslogc/syslogc.c
index
da49cc6
..
eaf4d62
100644
(file)
--- a/
usr.sbin/syslogc/syslogc.c
+++ b/
usr.sbin/syslogc/syslogc.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: syslogc.c,v 1.1
7 2014/11/26 18:34:52 miller
t Exp $ */
+/* $OpenBSD: syslogc.c,v 1.1
8 2015/10/13 16:30:55 deraad
t 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 */