1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/testprogs/blackbox/test_ldb_simple.sh
Stefan Metzmacher 2b40fb8509 CVE-2016-2112: s4:selftest: run some ldap test against ad_dc_ntvfs, fl2008r2dc and fl2003dc
We want to test against all "ldap server require strong auth" combinations.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11644

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2016-04-12 19:25:25 +02:00

42 lines
610 B
Bash
Executable File

#!/bin/sh
if [ $# -lt 2 ]; then
cat <<EOF
Usage: test_ldb_simple.sh PROTOCOL SERVER [OPTIONS]
EOF
exit 1;
fi
p=$1
SERVER=$2
PREFIX=$3
shift 2
options="$*"
. `dirname $0`/subunit.sh
check() {
name="$1"
shift
cmdline="$*"
echo "test: $name"
$cmdline
status=$?
if [ x$status = x0 ]; then
echo "success: $name"
else
echo "failure: $name"
failed=`expr $failed + 1`
fi
return $status
}
export PATH="$BINDIR:$PATH"
ldbsearch="$VALGRIND ldbsearch"
check "currentTime" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base currentTime || failed=`expr $failed + 1`
exit $failed