]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test010-passwd
Revert 1.11, the extra clause breaks test009-referral for back-bdb.
[openldap] / tests / scripts / test010-passwd
index 7c8c12c2360c4f4b4416c096c116110e4a4ef305..080063c709e3c7dede8b0b2ca6ad791ba36dec5b 100755 (executable)
@@ -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