diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
commit | 4f5791ebd03eaec1c7da0865a383175b05102712 (patch) | |
tree | 8ce7b00f7a76baa386372422adebbe64510812d4 /source3/script/tests/test_bad_auditnames.sh | |
parent | Initial commit. (diff) | |
download | samba-4f5791ebd03eaec1c7da0865a383175b05102712.tar.xz samba-4f5791ebd03eaec1c7da0865a383175b05102712.zip |
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'source3/script/tests/test_bad_auditnames.sh')
-rwxr-xr-x | source3/script/tests/test_bad_auditnames.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/script/tests/test_bad_auditnames.sh b/source3/script/tests/test_bad_auditnames.sh new file mode 100755 index 0000000..69ddf14 --- /dev/null +++ b/source3/script/tests/test_bad_auditnames.sh @@ -0,0 +1,29 @@ +#!/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)) |