openbsd-ports/net/isc-dhcp/patches/patch-server_dhcpd_c
2013-03-07 18:59:35 +00:00

17 lines
565 B
Plaintext

$OpenBSD: patch-server_dhcpd_c,v 1.2 2013/03/07 18:59:35 brad Exp $
--- server/dhcpd.c.orig Wed Jan 2 19:05:16 2013
+++ server/dhcpd.c Sun Feb 24 23:40:23 2013
@@ -707,6 +707,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);