diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2015-12-14 01:08:51 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2015-12-14 01:08:51 +0000 |
commit | b465257ee2919d692cec7120f91a91b765cad894 (patch) | |
tree | 5dcc126ec143b77c829a3bdc489059aee394dbf4 /usr.sbin/dhcpd/udpsock.c | |
parent | d1fb63e69c169893fa585fdba99bf578003e6eb0 (diff) |
pledge.
Diff from Ricardo Mestre. Test report from sthen@.
Diffstat (limited to 'usr.sbin/dhcpd/udpsock.c')
-rw-r--r-- | usr.sbin/dhcpd/udpsock.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/dhcpd/udpsock.c b/usr.sbin/dhcpd/udpsock.c index 182887ff17c..235299452cf 100644 --- a/usr.sbin/dhcpd/udpsock.c +++ b/usr.sbin/dhcpd/udpsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udpsock.c,v 1.2 2015/01/16 06:40:16 deraadt Exp $ */ +/* $OpenBSD: udpsock.c,v 1.3 2015/12/14 01:08:50 krw Exp $ */ /* * Copyright (c) 2014 YASUOKA Masahiko <yasuoka@openbsd.org> @@ -56,6 +56,9 @@ udpsock_startup(struct in_addr bindaddr) error("setsocketopt IP_RECVIF failed for udp: %s", strerror(errno)); + if (pledge("stdio rpath inet sendfd proc id", NULL) == -1) + error("pledge: %s", strerror(errno)); + sin4.sin_family = AF_INET; sin4.sin_len = sizeof(sin4); sin4.sin_addr = bindaddr; |