rpms/nss-pam-ldapd/F-13 nss-pam-ldapd.spec,1.7,1.8

Nalin Dahyabhai nalin at fedoraproject.org
Mon Jun 28 15:29:04 UTC 2010


Author: nalin

Update of /cvs/pkgs/rpms/nss-pam-ldapd/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv1307

Modified Files:
	nss-pam-ldapd.spec 
Log Message:
- don't accidentally set multiple 'gid' settings in nslcd.conf, and try to
  clean up after older versions of this package that did (#608314)



Index: nss-pam-ldapd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nss-pam-ldapd/F-13/nss-pam-ldapd.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- nss-pam-ldapd.spec	27 May 2010 21:40:11 -0000	1.7
+++ nss-pam-ldapd.spec	28 Jun 2010 15:29:04 -0000	1.8
@@ -1,6 +1,6 @@
 Name:		nss-pam-ldapd
 Version:	0.7.6
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	An nsswitch module which uses directory servers
 Group:		System Environment/Base
 License:	LGPLv2+
@@ -54,10 +54,8 @@ if test %{_libdir} != /%{_lib} ; then
 	rm $RPM_BUILD_ROOT/rootfile
 fi
 %endif
-cat >> $RPM_BUILD_ROOT/%{_sysconfdir}/nslcd.conf << EOF
-uid nslcd
-gid ldap
-EOF
+sed -i -e 's,^uid.*,uid nslcd,g' -e 's,^gid.*,gid ldap,g' \
+$RPM_BUILD_ROOT/%{_sysconfdir}/nslcd.conf
 touch -r nslcd.conf $RPM_BUILD_ROOT/%{_sysconfdir}/nslcd.conf
 mkdir -p 0755 $RPM_BUILD_ROOT/var/run/nslcd
 
@@ -144,6 +142,14 @@ if [ "$1" -eq "1" ]; then
 		/sbin/chkconfig nslcd on
 	fi
 fi
+# Earlier versions of 0.7.6 of this package would have included both 'gid
+# nslcd' (a group which doesn't exist) and 'gid ldap' (which we ensure exists).
+# If we detect both, fix the configuration.
+if grep -q '^gid nslcd' $target ; then
+	if grep -q '^gid ldap' $target ; then
+		sed -i -e 's,^gid nslcd$,# gid nslcd,g' $target
+	fi
+fi
 exit 0
 
 %preun
@@ -161,6 +167,10 @@ fi
 exit 0
 
 %changelog
+* Mon Jun 28 2010 Nalin Dahyabhai <nalin at redhat.com> 0.7.6-3
+- don't accidentally set multiple 'gid' settings in nslcd.conf, and try to
+  clean up after older versions of this package that did (#608314)
+
 * Thu May 27 2010 Nalin Dahyabhai <nalin at redhat.com> 0.7.6-2
 - make inclusion of the .so symlink conditional on being on a sufficiently-
   new Fedora where pam_ldap isn't part of the nss_ldap package, so having



More information about the scm-commits mailing list