diff --git a/nss-pam-ldapd.spec b/nss-pam-ldapd.spec index ec93afd..9ba514b 100644 --- a/nss-pam-ldapd.spec +++ b/nss-pam-ldapd.spec @@ -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 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 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