if test $RC = 0 ; then
echo "ldapwhoami should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing baseobject search..."
;;
*) echo "failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
;;
esac
;;
*) echo "failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
;;
esac
;;
*) echo "failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
;;
esac
. $LDIFFILTER < $SQLREAD > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
-
+
if test $? != 0 ; then
echo "comparison failed - SQL search didn't succeed"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
if test $RC = 0 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Modifying a referral (should fail)..."
if test $RC = 0 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Renaming a referral (should fail)..."
if test $RC = 0 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Deleting a referral (should fail)..."
if test $RC = 0 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Adding a referral..."
echo ">>>>> Test succeeded"
exit 0
-
if test $RC = 0 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Modifying a referral (should fail)..."
if test $RC = 0 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Renaming a referral (should fail)..."
if test $RC = 0 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Deleting a referral (should fail)..."
if test $RC = 0 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Adding a referral..."
echo ">>>>> Test succeeded"
exit 0
-
if test $RC = 0 ; then
echo "ldappasswd unexpectantly passed ($RC)! old empty"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
$LDAPPASSWD -h $LOCALHOST -p $PORT1 \
-w secret -a oldsecret -s "" \
if test $RC = 0 ; then
echo "ldappasswd unexpectantly passed ($RC)! new empty"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
$LDAPPASSWD -h $LOCALHOST -p $PORT1 \
-w secret -a oldsecret -s newsecret \
if test $RC = 0 ; then
echo "ldappasswd unexpectantly passed ($RC)! wrong old"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Using ldappasswd (PASS 1) ..."
if test $RC = 0 ; then
echo "Password expiration failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
COUNT=`grep "grace logins" $SEARCHOUT | wc -l`
if test $RC = 0 ; then
echo "ldapmodify failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing forced reset..."
if test $RC = 0 ; then
echo "Forced reset failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
COUNT=`grep "Operations are restricted" $SEARCHOUT | wc -l`
if test $RC = 0 ; then
echo "Safe modify test 1 failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
sleep 2
if test $RC = 0 ; then
echo "Length requirement test failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
COUNT=`grep "Password fails quality" $TESTOUT | wc -l`
if test $COUNT != 1 ; then
if test $RC = 0 ; then
echo "Hashed length requirement test failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
COUNT=`grep "Password fails quality" $TESTOUT | wc -l`
if test $COUNT != 1 ; then
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
*)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
*)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into the requested size limit ($SIZELIMIT; got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into the requested size limit ($SIZELIMIT; got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
3)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
11)
echo "...error: did not expect ldapsearch success ($RC)!"
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
;;
11)
echo "...bumped into unchecked administrative limit"
echo "...error: did not expect ldapsearch success ($RC)!"
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
;;
11)
echo "...bumped into unchecked administrative limit"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
*)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into the requested size limit ($SIZELIMIT; got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
3)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
if test "$COUNT" -gt "$SIZELIMIT" ; then
echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
# 11)
echo "...error: did not expect ldapsearch success ($RC)!"
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
;;
11)
echo "...bumped into unchecked administrative limit"
else
echo "...error: did not expect ldapsearch success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
;;
4)
echo "ldapadd failed ($RC), expected INSUFFICIENT ACCESS!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing add: valid local record, no_glue..."
echo "ldapadd failed ($RC), expected NO SUCH OBJECT!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing modrdn: valid local record, no_glue..."
echo "ldapmodrdn failed ($RC), expected NO SUCH OBJECT!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Shutting down local slapd..."
if test $RC != 6 ; then
echo "ldapcompare failed ($RC), expected TRUE!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing compare: valid remote..."
if test $RC != 6 ; then
echo "ldapcompare failed ($RC), expected TRUE!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing compare: bogus local..."
if test $RC != 5 ; then
echo "ldapcompare failed ($RC), expected FALSE!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing compare: bogus remote..."
if test $RC != 5 ; then
echo "ldapcompare failed ($RC), expected FALSE!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing modify: nonexistent record..."
echo "ldapmodify failed ($RC), expected NO SUCH OBJECT!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing modify: valid local record, nonexistent attribute..."
echo "ldapmodify failed ($RC), expected NO SUCH ATTRIBUTE!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing delete: valid local record, nonexistent attribute..."
echo "ldapmodrdn failed ($RC), expected INSUFFICIENT ACCESS!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing modrdn: valid local record..."
echo "ldapadd failed ($RC), expected INSUFFICIENT ACCESS!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing delete: valid local record..."
echo "ldapmodify failed ($RC), expected NO SUCH OBJECT!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing delete: nonexistent local record, nonexistent attribute..."
echo "ldapmodify failed ($RC), expected NO SUCH ATTRIBUTE!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing modify: valid remote record, combination add-modify-delete..."
echo "ldapmodify failed ($RC), expected CONSTRAINT VIOLATION!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing strict mode delete: nonexistent remote attribute..."
echo "ldapmodify failed ($RC), expected CONSTRAINT VIOLATION!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
echo "Testing strict mode modify: combination add-modify-delete..."
echo "ldapmodify failed ($RC), expected CONSTRAINT VIOLATION!"
grep "$FAILURE" $TESTOUT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
+ exit 1
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS