mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
ITS#3777 test password quality with hashed passwords
This commit is contained in:
parent
5e1cafdade
commit
b4dbc0ece8
1 changed files with 26 additions and 0 deletions
|
|
@ -311,6 +311,32 @@ if test $COUNT != 1 ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo "Testing hashed length requirement..."
|
||||
|
||||
$LDAPMODIFY -h $LOCALHOST -p $PORT1 -D "$USER" -w failexpect > \
|
||||
$TESTOUT 2>&1 << EOMODS
|
||||
dn: uid=nd, ou=People, o=University of Michigan, c=US
|
||||
changetype: modify
|
||||
delete: userPassword
|
||||
userPassword: failexpect
|
||||
-
|
||||
add: userPassword
|
||||
userPassword: {MD5}xxxxxx
|
||||
|
||||
EOMODS
|
||||
RC=$?
|
||||
if test $RC = 0 ; then
|
||||
echo "Hashed length requirement test failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
COUNT=`grep "Password fails quality" $TESTOUT | wc -l`
|
||||
if test $COUNT != 1 ; then
|
||||
echo "Hashed length requirement test failed"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
|
||||
echo ">>>>> Test succeeded"
|
||||
|
|
|
|||
Loading…
Reference in a new issue