s4:kdc: Implement KDC plugin hardware authentication policy
[samba.git] / source3 / script / tests / test_bad_auditnames.sh
1 #!/bin/sh
2
3 # this tests a full audit share with bad VFS
4 # names will not allow connection.
5 # BUG: https://bugzilla.samba.org/show_bug.cgi?id=15098
6
7 if [ $# -lt 5 ]; then
8         cat <<EOF
9 Usage: $0 SERVER SHARE USERNAME PASSWORD SMBCLIENT
10 EOF
11         exit 1
12 fi
13
14 SERVER="$1"
15 SHARE="$2"
16 USERNAME="$3"
17 PASSWORD="$4"
18 SMBCLIENT="$5"
19 SMBCLIENT="$VALGRIND ${SMBCLIENT}"
20
21 incdir=$(dirname "$0")/../../../testprogs/blackbox
22 . "$incdir/subunit.sh"
23
24 can_connect()
25 {
26         $SMBCLIENT //"$SERVER"/"$SHARE" -U"$USERNAME"%"$PASSWORD" -c "ls" | grep "tree connect failed: NT_STATUS_UNSUCCESSFUL" >/dev/null 2>&1
27 }
28
29 testit "Cannot connect to share $SHARE" can_connect || failed=$((failed + 1))