Marius Tomaschewski
d2a944c552
along with this package or online at: - Replaced hostname patch with a dhcpv6 and fqdn aware variant: [- 0006-dhcp-4.2.5-dhclient-send-hostname-rml.patch, + 0006-dhcp-4.3.2-dhclient-send-hostname-or-fqdn.patch] - Adjusted patch numbers in the spec file: [- 0008-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch, - 0010-dhcp-4.2.2-dhclient-option-checks.patch, - 0011-dhcp-4.2.6-close-on-exec.patch, - 0012-dhcp-4.2.2-quiet-dhclient.patch, - 0014-Fixed-linux-interface-discovery-using-getifaddrs.patch, - 0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch, - 0024-dhcp-4.2.x-dhcpv6-decline-on-DAD-failure.872609.patch, + 0008-dhcp-4.2.2-dhclient-option-checks.patch, + 0009-dhcp-4.2.6-close-on-exec.patch, + 0010-dhcp-4.2.2-quiet-dhclient.patch, + 0011-Fixed-linux-interface-discovery-using-getifaddrs.patch, + 0012-dhcp-4.2.x-chown-server-leases.bnc868253.patch, + 0013-dhcp-4.2.x-dhcpv6-decline-on-DAD-failure.872609.patch] - Fixed to not pass DHCPv6 address lifetimes a positive (unsigned 32bit) integers to scripts and properly format timestamps as long to not break them on 64bit architectures (bsc#926159). [+ 0014-dhclient6-unsigned-lifetimes-for-script-bsc-926159.patch] - dhclient: expose next-server DHCPv4 option to script (bsc#928390) [+ 0015-Expose-next-server-DHCPv4-option-to-dhclient-script.patch] - Replaced infiniband support patch with fixed variant (bsc#910984): [- 0017-dhcp-4.2.6-lpf-ip-over-ib-support.patch, - 0018-dhcp-4.2.6-improved-xid.patch, + 0016-infiniband-support.patch] - Moved dhcp-devel package include files and static libraries OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=154
39 lines
1.0 KiB
Diff
39 lines
1.0 KiB
Diff
From 34e6100717f3de5a32ccb3234a949d017f789fdb Mon Sep 17 00:00:00 2001
|
|
From: Marius Tomaschewski <mt@suse.de>
|
|
Date: Tue, 10 Jun 2014 02:42:32 +0000
|
|
Subject: [PATCH] dhcp-4.2.x-chown-server-leases.bnc868253
|
|
|
|
Fixed dhcp server to chown leases to run user at start
|
|
|
|
References: bnc#868253
|
|
Signed-off-by: Marius Tomaschewski <mt@suse.de>
|
|
|
|
diff --git a/server/dhcpd.c b/server/dhcpd.c
|
|
index afef390..0f5c640 100644
|
|
--- a/server/dhcpd.c
|
|
+++ b/server/dhcpd.c
|
|
@@ -770,8 +770,19 @@ main(int argc, char **argv) {
|
|
}
|
|
|
|
#if defined (PARANOIA)
|
|
- /* change uid to the specified one */
|
|
+ /* ensure, the leases db is owned by the run user/group */
|
|
+ if (set_gid || set_uid) {
|
|
+ char backfname[512];
|
|
+
|
|
+ chown(path_dhcpd_db, set_uid ? set_uid : -1,
|
|
+ set_gid ? set_gid : -1);
|
|
|
|
+ snprintf (backfname, sizeof backfname, "%s~", path_dhcpd_db);
|
|
+ chown(backfname, set_uid ? set_uid : -1,
|
|
+ set_gid ? set_gid : -1);
|
|
+ }
|
|
+
|
|
+ /* change uid to the specified one */
|
|
if (set_gid) {
|
|
/* setgroups is done, OK */
|
|
if (setgroups (0, (void *)0))
|
|
--
|
|
2.1.4
|
|
|