[nsd: 3/3] * Change /var/run/nsd to be owned by nsd to work around pidfile issue

Paul Wouters pwouters at fedoraproject.org
Tue Nov 29 19:08:15 UTC 2011


commit 380498406381950b9774e4c8988410b254f293fc
Author: Paul Wouters <paul at xelerance.com>
Date:   Tue Nov 29 14:06:54 2011 -0500

    * Change /var/run/nsd to be owned by nsd to work around pidfile issue
    
    nsdc restart causes nsd to attempt to update the pid file, but it no longer
    has root permissions to delete the root-owned file. ensure the dir is owned
    by nsd so it can replace the pid properly

 nsd.spec |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/nsd.spec b/nsd.spec
index aa27b60..d648c0a 100644
--- a/nsd.spec
+++ b/nsd.spec
@@ -1,7 +1,7 @@
 Summary: Fast and lean authoritative DNS Name Server
 Name: nsd
 Version: 3.2.9
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: BSD
 Url: http://www.nlnetlabs.nl/%{name}/
 Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
@@ -74,7 +74,8 @@ echo "# include: \"/some/path/file\"" >> %{buildroot}%{_sysconfdir}/nsd/nsd.conf
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/tmpfiles.d/nsd.conf
 %{_unitdir}/%{name}.service
 %{_sysconfdir}/cron.hourly/nsd
-%ghost %attr(0755,root,root) %dir %{_localstatedir}/run/%{name}
+# owner nsd is to work around 'nsdc restart' pid bug (no permission to unlink root file)
+%ghost %attr(0755,nsd,root) %dir %{_localstatedir}/run/%{name}
 %attr(0755,%{name},%{name}) %dir %{_localstatedir}/lib/%{name}
 %{_sbindir}/*
 %{_mandir}/*/*
@@ -118,6 +119,10 @@ fi
 
 
 %changelog
+* Tue Nov 29 2011 Paul Wouters <paul at xelerance.com> - 3.2.9-2
+- Change spec and initscript to chown /var/run/nsd to nsd user to work around
+  the "nsdc restart" problem where it cannot update its own pid file
+
 * Sun Nov 27 2011 Paul Wouters <paul at xelerance.com> - 3.2.9-1
 - Updated to 3.2.9
 


More information about the scm-commits mailing list