echo "Using ldapsearch to read all the entries..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $SEARCHOUT 2>&1
+RC=$?
kill -HUP $PID
echo "Testing exact searching..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'sn=jensen' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID
echo "Testing OR searching..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(|(givenName=XX*YY*Z)(cn=)(undef=*)(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID
echo "Testing AND matching and ends-with searching..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID
echo "Testing NOT searching..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(!(objectclass=pilotPerson))' >> $SEARCHOUT 2>&1
+RC=$?
+
+kill -HUP $PID
+
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
- kill -HUP $PID
exit $RC
fi
-kill -HUP $PID
-
LDIF=$SEARCHOUTMASTER
echo "Filtering ldapsearch results..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'cn=James A Jones 1' > $SEARCHOUT 2>&1
RC=$?
+
+kill -HUP $PID
+
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
- kill -HUP $PID
exit $RC
fi
-
LDIF=$MODRDNOUTMASTER3
echo "Filtering ldapsearch results..."
if test $? != 0 ; then
echo "comparison failed - modrdn operations did not complete correctly"
- kill -HUP $PID
exit 1
fi
-kill -HUP $PID
echo ">>>>> Test succeeded"
-
-
-# echo "modrdn test not yet written"
-
exit 0
echo "Using ldapsearch to retrieve all the entries..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
- 'objectClass=*' | . $LDIFFILTER >> $SEARCHOUT 2>&1
+ 'objectClass=*' >> $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the master..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $MASTEROUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Using ldapsearch to read all the entries from the slave..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'objectclass=*' > $SLAVEOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Testing exact searching..."
$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'sn=jensen' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID $SLAVEPID
echo "Testing OR searching..."
$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'(|(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID $SLAVEPID
echo "Testing AND matching and ends-with searching..."
$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID $SLAVEPID
echo "Testing NOT searching..."
$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'(!(objectclass=pilotPerson))' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID $SLAVEPID
fi
$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w $PASSWD -s newsecret \
- -D $MANAGERDN "cn=smd5, $BASEDN" >> $TESTOUT 2>&1
+ -D "$MANAGERDN" "cn=smd5, $BASEDN" >> $TESTOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldappasswd failed ($RC)!"
kill -HUP $PID
$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w secret -s newsecret \
-D "cn=sha, $BASEDN" >> $TESTOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldappasswd failed ($RC)!"
kill -HUP $PID
$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w secret -s newsecret \
-D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldappasswd failed ($RC)!"
kill -HUP $PID
$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w newsecret \
-D "cn=md5, $BASEDN" >> $TESTOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldappasswd failed ($RC)!"
kill -HUP $PID
$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w newsecret \
-D "cn=smd5, $BASEDN" >> $TESTOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldappasswd failed ($RC)!"
kill -HUP $PID
$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w newsecret \
-D "cn=sha, $BASEDN" >> $TESTOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldappasswd failed ($RC)!"
kill -HUP $PID
$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w newsecret \
-D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldappasswd failed ($RC)!"
kill -HUP $PID
echo "Using ldapsearch to read all the entries from the master..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $MASTEROUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Using ldapsearch to read the subtree entries from the master..."
$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $SUBMASTEROUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Using ldapsearch to read all the entries from the slave..."
$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'objectclass=*' > $SLAVEOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-BACKEND=ldbm
+BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "Using ldapsearch to read all the entries..."
$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $SEARCHOUT 2>&1
+RC=$?
kill -HUP $PID
echo "Using ldapsearch to read all the entries..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT -s base \
'(&)' > $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Using ldapsearch to read name ..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT -s base \
'(&)' 'name' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Using ldapsearch to read name language tag ..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT -s base \
'(&)' 'name;lang-en-US' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Using ldapsearch to read name language range ..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT -s base \
'(&)' 'name;lang-en-' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Testing exact searching..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(sn:=jensen)' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID
echo "Testing OR searching..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(|(givenName=XX*YY*Z)(cn=)(undef=*)(objectclass=groupofnames)(sn:caseExactMatch:=Jones))' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID
echo "Testing AND matching and ends-with searching..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID
echo "Testing NOT searching..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(!(objectclass=pilotPerson))' >> $SEARCHOUT 2>&1
+RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID