openbsd-ports/net/isc-dhcp/patches/patch-server_dhcpd_c

17 lines
566 B
Plaintext

$OpenBSD: patch-server_dhcpd_c,v 1.1 2012/01/14 12:43:25 sthen Exp $
--- server/dhcpd.c.orig Thu Apr 21 10:08:15 2011
+++ server/dhcpd.c Fri Dec 23 14:14:41 2011
@@ -705,6 +705,12 @@ main(int argc, char **argv) {
if (lftest)
exit (0);
+#if defined (PARANOIA)
+ /* Set proper permissions... */
+ if (lchown (path_dhcpd_db, set_uid, set_gid))
+ log_fatal ("lchown(%s, %d, %d): %m", path_dhcpd_db, (int) set_uid, (int) set_gid);
+#endif /* PARANOIA */
+
/* Discover all the network interfaces and initialize them. */
discover_interfaces(DISCOVER_SERVER);