exit $RC
fi
-echo "Comparing database to reference file"
-cmp $SEARCHOUT $ACLOUTMASTER
+LDIF=$ACLOUTMASTER
+
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+echo "Comparing filter output..."
+cmp $SEARCHFLT $LDIFFLT
+
if test $? != 0 ; then
echo "comparison failed - modify operations did not complete correctly"
exit 1