diff --git a/ldap.init b/ldap.init index de0d5ce..6531950 100644 --- a/ldap.init +++ b/ldap.init @@ -94,10 +94,18 @@ function configtest() { prog=`basename ${slapd}` ldapuid=`id -u $user` # Unaccessible database files. - for dbdir in `grep ^directory /etc/openldap/slapd.conf | sed s,^directory,,` ; do + slaptestflags= + for dbdir in `LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' /etc/openldap/slapd.conf | sed s,^directory,,` ; do for file in `find ${dbdir}/ -not -uid $ldapuid -and \( -name "*.dbb" -or -name "*.gdbm" -or -name "*.bdb" \)` ; do echo -n $"$file is not owned by \"$user\"" ; warning ; echo done + if ! test -s ${dbdir}/id2entry.dbb ; then + if ! test -s ${dbdir}/id2entry.bdb ; then + if ! test -s ${dbdir}/id2entry.gdbm ; then + slaptestflags=-u + fi + fi + fi done # Unaccessible keytab with an "ldap" key. if checkkeytab $user ldap ; then @@ -112,7 +120,7 @@ function configtest() { fi done # Check the configuration file. - if ! action $"Checking configuration files for $prog: " $slaptest ; then + if ! action $"Checking configuration files for $prog: " $slaptest $slaptestflags ; then if $slaptest -u > /dev/null 2> /dev/null ; then dirs=`LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' /etc/openldap/slapd.conf | awk '{print $2}'` for directory in $dirs ; do diff --git a/openldap.spec b/openldap.spec index d649b63..f3c3291 100644 --- a/openldap.spec +++ b/openldap.spec @@ -709,7 +709,11 @@ fi %endif %changelog -* Wed May 4 2005 Nalin Dahyabhai 2.2.26-1 +* Thu May 19 2005 Nalin Dahyabhai +- run slaptest with the -u flag if no id2entry db files are found, because + you can't read-write access a non-existent database (#156787) + +* Wed May 4 2005 Nalin Dahyabhai - update to 2.2.26 (stable 20050429) - enable the lmpasswd scheme - print a warning if slaptest fails, slaptest -u succeeds, and one of the