X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fscripts%2Ftest010-passwd;h=080063c709e3c7dede8b0b2ca6ad791ba36dec5b;hb=b45fb4f5c5ac9bf5e331934017f5e19abee61eee;hp=7c8c12c2360c4f4b4416c096c116110e4a4ef305;hpb=daacf23672ce3cf0d98f8c18e0fa2f017746c213;p=openldap diff --git a/tests/scripts/test010-passwd b/tests/scripts/test010-passwd index 7c8c12c236..080063c709 100755 --- a/tests/scripts/test010-passwd +++ b/tests/scripts/test010-passwd @@ -1,16 +1,20 @@ #! /bin/sh # $OpenLDAP$ -if test $# -eq 0 ; then - SRCDIR="." -else +SRCDIR="." +if test $# -ge 1 ; then SRCDIR=$1; shift fi -if test $# -eq 1 ; then +BACKEND=ldbm +if test $# -ge 1 ; then BACKEND=$1; shift fi +WAIT=0 +if test $# -ge 1 ; then + WAIT=1; shift +fi -echo "running defines.sh $SRCDIR $BACKEND" +echo "running defines.sh" . $SRCDIR/scripts/defines.sh echo "Cleaning up in $DBDIR..." @@ -18,8 +22,13 @@ echo "Cleaning up in $DBDIR..." rm -f $DBDIR/[!C]* echo "Starting slapd on TCP/IP port $PORT..." -$SLAPD -f $PWCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 & +. $CONFFILTER $BACKEND < $PWCONF > $DBCONF +$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 & PID=$! +if test $WAIT != 0 ; then + echo PID $PID + read foo +fi echo "Using ldapsearch to check that slapd is running..." for i in 0 1 2 3 4 5; do @@ -56,7 +65,7 @@ echo "Using ldappasswd (PASS 1) ..." echo "Pass 1" >> $TESTOUT $LDAPPASSWD -h localhost -p $PORT \ -w secret -s newsecret \ - "cn=md5, $BASEDN" >> $TESTOUT 2>&1 + -D "cn=md5, $BASEDN" >> $TESTOUT 2>&1 RC=$? if test $RC != 0 ; then echo "ldappasswd failed ($RC)!" @@ -64,8 +73,8 @@ if test $RC != 0 ; then exit $RC fi $LDAPPASSWD -h localhost -p $PORT \ - -w secret -s newsecret \ - "cn=smd5, $BASEDN" >> $TESTOUT 2>&1 + -w $PASSWD -s newsecret \ + -D $MANAGERDN "cn=smd5, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldappasswd failed ($RC)!" kill -HUP $PID @@ -73,7 +82,7 @@ if test $RC != 0 ; then fi $LDAPPASSWD -h localhost -p $PORT \ -w secret -s newsecret \ - "cn=sha, $BASEDN" >> $TESTOUT 2>&1 + -D "cn=sha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldappasswd failed ($RC)!" kill -HUP $PID @@ -81,7 +90,7 @@ if test $RC != 0 ; then fi $LDAPPASSWD -h localhost -p $PORT \ -w secret -s newsecret \ - "cn=ssha, $BASEDN" >> $TESTOUT 2>&1 + -D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldappasswd failed ($RC)!" kill -HUP $PID @@ -93,7 +102,7 @@ echo "Pass 2" >> $TESTOUT echo "Using ldappasswd (PASS 2) ..." $LDAPPASSWD -h localhost -p $PORT \ -w newsecret \ - "cn=md5, $BASEDN" >> $TESTOUT 2>&1 + -D "cn=md5, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldappasswd failed ($RC)!" kill -HUP $PID @@ -101,7 +110,7 @@ if test $RC != 0 ; then fi $LDAPPASSWD -h localhost -p $PORT \ -w newsecret \ - "cn=smd5, $BASEDN" >> $TESTOUT 2>&1 + -D "cn=smd5, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldappasswd failed ($RC)!" kill -HUP $PID @@ -109,7 +118,7 @@ if test $RC != 0 ; then fi $LDAPPASSWD -h localhost -p $PORT \ -w newsecret \ - "cn=sha, $BASEDN" >> $TESTOUT 2>&1 + -D "cn=sha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldappasswd failed ($RC)!" kill -HUP $PID @@ -117,7 +126,7 @@ if test $RC != 0 ; then fi $LDAPPASSWD -h localhost -p $PORT \ -w newsecret \ - "cn=ssha, $BASEDN" >> $TESTOUT 2>&1 + -D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then echo "ldappasswd failed ($RC)!" kill -HUP $PID