- 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}`
|
prog=`basename ${slapd}`
|
||||||
ldapuid=`id -u $user`
|
ldapuid=`id -u $user`
|
||||||
# Unaccessible database files.
|
# 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
|
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
|
echo -n $"$file is not owned by \"$user\"" ; warning ; echo
|
||||||
done
|
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
|
done
|
||||||
# Unaccessible keytab with an "ldap" key.
|
# Unaccessible keytab with an "ldap" key.
|
||||||
if checkkeytab $user ldap ; then
|
if checkkeytab $user ldap ; then
|
||||||
@ -112,7 +120,7 @@ function configtest() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# Check the configuration file.
|
# 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
|
if $slaptest -u > /dev/null 2> /dev/null ; then
|
||||||
dirs=`LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' /etc/openldap/slapd.conf | awk '{print $2}'`
|
dirs=`LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' /etc/openldap/slapd.conf | awk '{print $2}'`
|
||||||
for directory in $dirs ; do
|
for directory in $dirs ; do
|
||||||
|
@ -709,7 +709,11 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%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)
|
- update to 2.2.26 (stable 20050429)
|
||||||
- enable the lmpasswd scheme
|
- enable the lmpasswd scheme
|
||||||
- print a warning if slaptest fails, slaptest -u succeeds, and one of the
|
- print a warning if slaptest fails, slaptest -u succeeds, and one of the
|
||||||
|
Loading…
Reference in New Issue
Block a user