1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/source3/script/tests/test_bad_auditnames.sh
Jeremy Allison fe78d3c014 s3: test: Add tests to show we still connect to a full_audit share with a bad success or fail VFS names.
Add knownfail.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-06-17 01:28:29 +00:00

30 lines
658 B
Bash
Executable File

#!/bin/sh
# this tests a full audit share with bad VFS
# names will not allow connection.
# BUG: https://bugzilla.samba.org/show_bug.cgi?id=15098
if [ $# -lt 5 ]; then
cat <<EOF
Usage: $0 SERVER SHARE USERNAME PASSWORD SMBCLIENT
EOF
exit 1
fi
SERVER="$1"
SHARE="$2"
USERNAME="$3"
PASSWORD="$4"
SMBCLIENT="$5"
SMBCLIENT="$VALGRIND ${SMBCLIENT}"
incdir=$(dirname "$0")/../../../testprogs/blackbox
. "$incdir/subunit.sh"
can_connect()
{
$SMBCLIENT //"$SERVER"/"$SHARE" -U"$USERNAME"%"$PASSWORD" -c "ls" | grep "tree connect failed: NT_STATUS_UNSUCCESSFUL" >/dev/null 2>&1
}
testit "Cannot connect to share $SHARE" can_connect || failed=$((failed + 1))