rpms/bind/FC-6 bind-chroot-admin.in, 1.16, 1.17 bind.spec, 1.150, 1.151

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue May 15 12:19:05 UTC 2007


Author: atkac

Update of /cvs/dist/rpms/bind/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv32481

Modified Files:
	bind-chroot-admin.in bind.spec 
Log Message:
fixed bind-chroot-admin dynamic DNS handling (#239149)



Index: bind-chroot-admin.in
===================================================================
RCS file: /cvs/dist/rpms/bind/FC-6/bind-chroot-admin.in,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- bind-chroot-admin.in	27 Apr 2007 14:03:50 -0000	1.16
+++ bind-chroot-admin.in	15 May 2007 12:19:02 -0000	1.17
@@ -55,11 +55,9 @@
 {
     if [ -x /usr/sbin/selinuxenabled ]; then
       /usr/sbin/selinuxenabled;
-      if [ $? -eq 0 ]; then
-        return 1;
-      fi;
+      return $?;
     fi;
-    return 0;
+    return 1;
 }
 
 function check_dirs()
@@ -209,6 +207,27 @@
     /bin/sed -i -e '/^ROOTDIR=/d' /etc/sysconfig/named;
 }
 
+function master_zone_writes_enabled()
+{
+    if selinux_enabled; then
+	if [ -x /usr/sbin/getsebool ]; then
+	    named_write_master_zones=`/usr/sbin/getsebool named_write_master_zones | cut -d' ' -f3`;
+	    if [ $named_write_master_zones == "on" ]; then
+		return 0;
+	    else
+		return 1;
+	    fi;
+	fi;
+    fi;
+
+    . /etc/sysconfig/named
+    if [ "$ENABLE_ZONE_WRITE" =  [yY1]* ]; then
+	return 0;
+    fi;
+
+    return 1;
+}
+
 function sync_files()
 {
     rootdir;
@@ -248,9 +267,14 @@
 };'     > /etc/rndc.key;
     elif /bin/egrep -q '@KEY@' /etc/rndc.key; then
 	/bin/sed -i -e 's^@KEY@^'`/usr/sbin/dns-keygen`'^' /etc/rndc.key ;
-    fi    
-    chown -h root:named /var/named/* >/dev/null 2>&1;
-    chown -h root:named ${BIND_CHROOT_PREFIX}/var/named/* >/dev/null 2>&1;
+    fi
+    if master_zone_writes_enabled; then
+	chown -h named:named /var/named/* >/dev/null 2>&1;
+	chown -h named:named ${BIND_CHROOT_PREFIX}/var/named/* >/dev/null 2>&1;
+    else
+	chown -h root:named /var/named/* >/dev/null 2>&1;
+	chown -h root:named ${BIND_CHROOT_PREFIX}/var/named/* >/dev/null 2>&1;
+    fi
     chown -h root:named /etc/{named,rndc}.* >/dev/null 2>&1;
     chown -h root:named ${BIND_CHROOT_PREFIX}/etc/{named,rndc}.* >/dev/null 2>&1;
     chmod 750 ${pfx}/var/named  >/dev/null 2>&1;


Index: bind.spec
===================================================================
RCS file: /cvs/dist/rpms/bind/FC-6/bind.spec,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -r1.150 -r1.151
--- bind.spec	27 Apr 2007 14:08:30 -0000	1.150
+++ bind.spec	15 May 2007 12:19:02 -0000	1.151
@@ -17,7 +17,7 @@
 Name: 		bind
 License: 	BSD-like
 Version: 	9.3.4
-Release: 	4%{?dist}
+Release: 	5%{?dist}
 Epoch:   	31
 Url: 		http://www.isc.org/products/BIND/
 Buildroot: 	%{_tmppath}/%{name}-root
@@ -779,6 +779,9 @@
 :;
 
 %changelog
+* Tue May 15 2007 Adam Tkac <atkac redhat com> 31:9.3.4-5.fc7
+- fixed bind-chroot-admin dynamic DNS handling (#239149)
+
 * Fri Apr 27 2007 Adam Tkac <atkac redhat com> 31:9.3.4-4.fc6
 - fixed some issues in bind-chroot-admin script
 - fixed race-condition in dbus code (#235809)




More information about the fedora-cvs-commits mailing list