mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-05-28 04:35:57 -04:00
ITS#6152 test pwdModify
This commit is contained in:
parent
27c39c56c4
commit
07237a711c
1 changed files with 44 additions and 0 deletions
|
|
@ -493,6 +493,12 @@ mail: dots@admin.example2.com
|
|||
-
|
||||
|
||||
EOF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapmodify failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
SLEEP=`expr $PCACHETTR + $PCACHE_CCPERIOD`
|
||||
echo "Waiting $SLEEP seconds for cache to refresh"
|
||||
|
|
@ -564,6 +570,44 @@ if test $RC != 0 ; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Testing pwdModify"
|
||||
$LDAPPASSWD -h $LOCALHOST -p $PORT2 \
|
||||
-D "$MANAGERDN" -w "$PASSWD" -s newpw "$USERDN" >> $TESTOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldappasswd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
RC=`grep "CACH.* BIND" $LOG2 | wc -l`
|
||||
if test $RC != 3 ; then
|
||||
echo "ldappasswd didn't update the cache"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS && wait
|
||||
exit 0
|
||||
fi
|
||||
|
||||
CNT=`expr $CNT + 1`
|
||||
USERDN="cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com"
|
||||
UPASSWD=newpw
|
||||
echo "Query $CNT: (Bind should be cached)"
|
||||
echo "# Query $CNT: (Bind should be cached)" >> $SEARCHOUT
|
||||
$LDAPSEARCH -S "" -b "" -s base -h $LOCALHOST -p $PORT2 \
|
||||
-D "$USERDN" -w "$UPASSWD" >> $SEARCHOUT 2>> $TESTOUT
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
RC=`grep "CACH.* BIND" $LOG2 | wc -l`
|
||||
if test $RC != 4 ; then
|
||||
echo "Bind wasn't answered from cache"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS && wait
|
||||
exit 0
|
||||
fi
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
|
||||
echo ">>>>> Test succeeded"
|
||||
|
|
|
|||
Loading…
Reference in a new issue