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 /source4/setup/tests/blackbox_spn.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 'source4/setup/tests/blackbox_spn.sh')
-rwxr-xr-x | source4/setup/tests/blackbox_spn.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source4/setup/tests/blackbox_spn.sh b/source4/setup/tests/blackbox_spn.sh new file mode 100755 index 0000000..46e4061 --- /dev/null +++ b/source4/setup/tests/blackbox_spn.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + cat <<EOF +Usage: blackbox_group.sh PREFIX +EOF + exit 1 +fi + +PREFIX="$1" +shift 1 + +. $(dirname $0)/../../../testprogs/blackbox/subunit.sh + +samba_tool="./bin/samba-tool" + +CONFIG="--configfile=$PREFIX/etc/smb.conf" + +#creation of two test subjects +testit "addspn" $PYTHON $samba_tool spn add FOO/bar Administrator $CONFIG +testit "delspn" $PYTHON $samba_tool spn delete FOO/bar $CONFIG +testit "readdspn" $PYTHON $samba_tool spn add FOO/bar Administrator $CONFIG +testit_expect_failure "failexistingspn" $PYTHON $samba_tool spn add FOO/bar Guest $CONFIG +testit_expect_failure "faildelspnnotgooduser" $PYTHON $samba_tool spn delete FOO/bar krbtgt $CONFIG +testit "deluserspn" $PYTHON $samba_tool spn delete FOO/bar $CONFIG +testit "readd_spn_guest" $PYTHON $samba_tool spn add FOO/bar Guest $CONFIG +testit "deluserspn_guest" $PYTHON $samba_tool spn delete FOO/bar Guest $CONFIG +testit_expect_failure "faildelspn" $PYTHON $samba_tool spn delete FOO/bar $CONFIG +testit_expect_failure "failaddspn" $PYTHON $samba_tool spn add FOO/bar nonexistinguser $CONFIG + +exit $failed |