initscript: fix possible infinite loop

Resolves: #641946
This commit is contained in:
Jan Vcelak 2010-11-01 13:17:50 +01:00
parent 54ef52388e
commit b7ea9f6802
2 changed files with 10 additions and 10 deletions

View File

@ -150,17 +150,16 @@ function configtest() {
fi
# Unaccessible TLS configuration files.
if [ -d $configdir ]; then
tlsconfigs=`LANG=C awk '/^olcTLS/ {
while (/^olcTLS/) {
if (/^olc(TLSCertificateKeyFile|TLSCertificateFile|TLSCACertificateFile)[ \t]*:[\t]*/) {
do { printf gensub(/^ /,"",1); getline } while (/^ /)
printf "\n" ;
}
else break;
}
}' $configdir/cn\=config.ldif | awk '{print $2}'`
tlsconfigs=$(LANG=C sed \
-e '/^olcTLS\(CertificateFile\|CertificateKeyFile\|CACertificateFile\)/!d' \
-e ':a;N;s/\n //;ta;P;D' "${configdir}/cn=config.ldif" | \
awk '{print $2}' | sort -u
)
elif [ -f $configfile ]; then
tlsconfigs=`LANG=C egrep '^(TLSCACertificateFile|TLSCertificateFile|TLSCertificateKeyFile)[[:space:]]+' $configfile | awk '{print $2}'`
tlsconfigs=$(LANG=C egrep \
'^(TLSCACertificateFile|TLSCertificateFile|TLSCertificateKeyFile)[[:space:]]+' $configfile | \
awk '{print $2}' | sort -u
)
fi
for file in $tlsconfigs ; do
if ! testasuser $user -r $file ; then

View File

@ -644,6 +644,7 @@ exit 0
%changelog
* Mon Nov 01 2010 Jan Vcelak <jvcelak@redhat.com> 2.4.23-2
- fix possible infinite loop when checking permissions of TLS files (#641946)
- removed outdated autofs.schema (#643045)
- removed outdated README.upgrade
- removed relics of migrationtools