1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-03 06:45:37 -08:00

After the socket is open, the remainder is just io operations.

Use pledge "stdio".
This commit is contained in:
deraadt 2015-10-13 16:30:55 +00:00
parent 6cf2cbbbc9
commit a3cebea439

View File

@ -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 */