- 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)
This commit is contained in:
parent
e466757d0d
commit
704e3ceec0
12
ldap.init
12
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
|
||||
|
@ -709,7 +709,11 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed May 4 2005 Nalin Dahyabhai <nalin@redhat.com> 2.2.26-1
|
||||
* Thu May 19 2005 Nalin Dahyabhai <nalin@redhat.com>
|
||||
- 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 <nalin@redhat.com>
|
||||
- update to 2.2.26 (stable 20050429)
|
||||
- enable the lmpasswd scheme
|
||||
- print a warning if slaptest fails, slaptest -u succeeds, and one of the
|
||||
|
Loading…
Reference in New Issue
Block a user