[pdns/el5] Fixed permissions of pdns.conf file (rhbz#646510)
Morten Stevens
mstevens at fedoraproject.org
Sat Oct 20 22:50:51 UTC 2012
commit 5822c2620de3d9148f99f3d13699f1c62496913f
Author: Morten Stevens <mstevens at imt-systems.com>
Date: Sun Oct 21 00:50:20 2012 +0200
Fixed permissions of pdns.conf file (rhbz#646510)
pdns-default-config.patch | 9 ++++++++
pdns.spec | 48 +++++++++++++++++++++++++-------------------
2 files changed, 36 insertions(+), 21 deletions(-)
---
diff --git a/pdns-default-config.patch b/pdns-default-config.patch
new file mode 100644
index 0000000..64eb052
--- /dev/null
+++ b/pdns-default-config.patch
@@ -0,0 +1,9 @@
+--- pdns-2.9.22/pdns/pdns.conf-dist.orig 2008-02-23 11:41:41.000000000 +0100
++++ pdns-2.9.22/pdns/pdns.conf-dist 2012-10-21 00:31:38.806051953 +0200
+@@ -1,3 +1,6 @@
++setuid=pdns
++setgid=pdns
++launch=bind
+ # Autogenerated configuration file template
+ #################################
+ # allow-axfr-ips Allow zonetransfers only to these subnets
diff --git a/pdns.spec b/pdns.spec
index 6ae7476..6587992 100644
--- a/pdns.spec
+++ b/pdns.spec
@@ -1,21 +1,25 @@
-Summary: A modern, advanced and high performance authoritative-only nameserver
-Name: pdns
-Version: 2.9.22
-Release: 4%{?dist}
+Summary: A modern, advanced and high performance authoritative-only nameserver
+Name: pdns
+Version: 2.9.22
+Release: 5%{?dist}
+License: GPLv2
+Group: System Environment/Daemons
+URL: http://powerdns.com
+Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
-Group: System Environment/Daemons
-License: GPLv2
-URL: http://powerdns.com
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
-Patch0: %{name}-fixinit.patch
-Patch1: %{name}-cve-2012-0206.patch
+# Patches
+
+Patch0: pdns-default-config.patch
+Patch1: pdns-fixinit.patch
+Patch2: pdns-cve-2012-0206.patch
-Requires(post): %{_sbindir}/useradd, /sbin/chkconfig
-Requires(preun): /sbin/service, /sbin/chkconfig
+Requires(post): %{_sbindir}/useradd, /sbin/chkconfig
+Requires(preun): /sbin/service, /sbin/chkconfig
-BuildRequires: boost-devel, chrpath
-Provides: powerdns = %{version}-%{release}
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: boost-devel
+BuildRequires: chrpath
+Provides: powerdns = %{version}-%{release}
%description
The PowerDNS Nameserver is a modern, advanced and high performance
@@ -80,8 +84,9 @@ This package contains the SQLite backend for %{name}
%prep
%setup -q
-%patch0 -p1 -b .fixinit
-%patch1 -p1
+%patch0 -p1 -b .default-config-patch
+%patch1 -p1 -b .fixinit
+%patch2 -p1 -b .cve-2012-0206
%build
export CPPFLAGS="-DLDAP_DEPRECATED %{optflags}"
@@ -106,9 +111,7 @@ make install DESTDIR=%{buildroot}
%{__install} -p -D -m 0755 pdns/pdns %{buildroot}%{_initrddir}/pdns
%{__mv} %{buildroot}%{_sysconfdir}/%{name}/pdns.conf{-dist,}
-# add the pdns user to the config file
-sed -i '1i\setuid=pdns' %{buildroot}%{_sysconfdir}/%{name}/pdns.conf
-sed -i '2i\setgid=pdns' %{buildroot}%{_sysconfdir}/%{name}/pdns.conf
+chmod 600 %{buildroot}%{_sysconfdir}/%{name}/pdns.conf
# strip the static rpath from the binaries
chrpath --delete %{buildroot}%{_bindir}/pdns_control
@@ -181,6 +184,10 @@ fi
%changelog
+* Sat Oct 20 2012 Morten Stevens <mstevens at imt-systems.com> - 2.9.22-5
+- Fixed permissions of pdns.conf file (rhbz#646510)
+- Set bind as default backend
+
* Mon Jan 09 2012 Ruben Kerkhof <ruben at rubenkerkhof.com> 2.9.22-4
- CVE-2012-0206
@@ -222,4 +229,3 @@ fi
- Subpackages now require %%{version}-%%{release}
* Sat Dec 16 2006 <ruben at rubenkerkhof.com> 2.9.20-1
- Initial import
-
More information about the scm-commits
mailing list