diff --git a/0019-dhcp-4.2.x-ldap-debug-write.bnc835818.patch b/0019-dhcp-4.2.x-ldap-debug-write.bnc835818.patch new file mode 100644 index 0000000..40d00bf --- /dev/null +++ b/0019-dhcp-4.2.x-ldap-debug-write.bnc835818.patch @@ -0,0 +1,13 @@ +References: bnc#835818 + +--- dhcp-4.2.x-ldap/server/ldap.c ++++ dhcp-4.2.x-ldap/server/ldap.c 2014/04/15 01:34:59 +@@ -2103,6 +2103,8 @@ ldap_read_config (void) + + if (x_parser_length(cfile) > 0) + { ++ ldap_write_debug (cfile->inbuf, cfile->buflen); ++ + res = conf_file_subparse (cfile, root_group, ROOT_GROUP); + if (res != ISC_R_SUCCESS) + { diff --git a/0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch b/0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch new file mode 100644 index 0000000..346705a --- /dev/null +++ b/0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch @@ -0,0 +1,25 @@ +References: bnc#868253 + +--- dhcp-4.2.x/server/dhcpd.c ++++ dhcp-4.2.x/server/dhcpd.c 2014/06/10 01:59:13 +@@ -783,8 +783,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)) diff --git a/dhclient-script b/dhclient-script index d7fd8a5..811e899 100644 --- a/dhclient-script +++ b/dhclient-script @@ -115,6 +115,20 @@ netconfig_remove() { /sbin/netconfig remove -s "dhclient$ipver" -i "$interface" 1220 +BuildRequires: gpg-offline +%endif BuildRequires: automake %package server @@ -226,6 +233,9 @@ Authors: %prep +%if 0%{?gpg_verify:1} +%gpg_verify %{S:1} +%endif %setup -q -n %{name}-%{isc_version} -a 44 -a 45 ## %patch1 -p1 @@ -248,6 +258,8 @@ Authors: %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 +%patch20 -p1 ## find . -type f -name \*.cat\* -exec rm -f {} \; dos2unix contrib/ms2isc/* @@ -370,6 +382,7 @@ install -m0750 $RPM_SOURCE_DIR/dhclient-script $RPM_BUILD_ROOT/sbin/ install -d -m0755 $RPM_BUILD_ROOT/usr/lib/dhcp install -m0755 $RPM_SOURCE_DIR/dhcpd.script \ $RPM_BUILD_ROOT/usr/lib/dhcp/dhcpd +sed -e 's/@LIBDIR@/%{_lib}/g' -i $RPM_BUILD_ROOT/usr/lib/dhcp/dhcpd install -m0755 $RPM_SOURCE_DIR/dhcrelay.script \ $RPM_BUILD_ROOT/usr/lib/dhcp/dhcrelay %if %{with systemd} @@ -481,7 +494,7 @@ popd %post server %if %{with systemd} -%{fillup_only -ans dhcpd dhcpd} +%{fillup_only -n dhcpd dhcpd} %{fillup_only -ans syslog dhcpd} %service_add_post dhcpd.service %service_add_post dhcpd6.service diff --git a/dhcpd.script b/dhcpd.script index 0402896..942d9e5 100644 --- a/dhcpd.script +++ b/dhcpd.script @@ -208,7 +208,7 @@ case "$1" in cp -aL "$i" "${CHROOT_PREFIX}/${i%/*}/" &>/dev/null \ || { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; } done - libdir=$(basename $(echo ${CHROOT_PREFIX}/lib*)) + libdir=@LIBDIR@ if test -x /usr/bin/ldd ; then get_ldd_deps() {