summaryrefslogtreecommitdiffstats
path: root/main/dhcp/dhcp-3.0-fix-perms.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-12-31 10:21:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-12-31 10:21:18 +0000
commitd42dbe6e44d01f401983e5a92a366cb47a7a73cc (patch)
tree539b6aab556165e13fe0123416f351fa6653f3e8 /main/dhcp/dhcp-3.0-fix-perms.patch
parent9d2361e064733b538a201fe2bcfebdda6a45c4f9 (diff)
downloadaports-d42dbe6e44d01f401983e5a92a366cb47a7a73cc.tar.bz2
aports-d42dbe6e44d01f401983e5a92a366cb47a7a73cc.tar.xz
main/dhcp: fix permissions for lease file
fixes #224
Diffstat (limited to 'main/dhcp/dhcp-3.0-fix-perms.patch')
-rw-r--r--main/dhcp/dhcp-3.0-fix-perms.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/main/dhcp/dhcp-3.0-fix-perms.patch b/main/dhcp/dhcp-3.0-fix-perms.patch
new file mode 100644
index 000000000..78725c2c7
--- /dev/null
+++ b/main/dhcp/dhcp-3.0-fix-perms.patch
@@ -0,0 +1,15 @@
+--- a/server/dhcpd.c 2003-11-05 14:08:09.000000000 -0800
++++ b/server/dhcpd.c 2003-11-05 14:15:32.000000000 -0800
+@@ -602,6 +602,12 @@
+ 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);
+