diff options
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; |