summaryrefslogtreecommitdiff
path: root/source4/setup
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-07-02 23:52:33 +0400
committerStefan Metzmacher <metze@samba.org>2010-07-10 11:18:17 +0200
commitcad04dabbb89b024628ab3ec9bf2772d2fbe5182 (patch)
treeceb6bef8cce0c7f7230a633b87ceb32ce618a7b5 /source4/setup
parent22dfb16d73667d7adbe28e85d880c44a5e9f9344 (diff)
downloadsamba-cad04dabbb89b024628ab3ec9bf2772d2fbe5182.tar.gz
samba-cad04dabbb89b024628ab3ec9bf2772d2fbe5182.tar.bz2
samba-cad04dabbb89b024628ab3ec9bf2772d2fbe5182.zip
s4 net: Add spn module to list/add/remove spn on objects
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/setup')
-rwxr-xr-xsource4/setup/tests/blackbox_spn.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/source4/setup/tests/blackbox_spn.sh b/source4/setup/tests/blackbox_spn.sh
new file mode 100755
index 0000000000..f2fd8acfbb
--- /dev/null
+++ b/source4/setup/tests/blackbox_spn.sh
@@ -0,0 +1,33 @@
+#!/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
+
+
+net="./bin/net"
+
+CONFIG="--configfile=$PREFIX/etc/smb.conf"
+
+#creation of two test subjects
+testit "addspn" $net spn add FOO/bar Administrator $CONFIG
+testit "delspn" $net spn delete FOO/bar $CONFIG
+testit "readdspn" $net spn add FOO/bar Administrator $CONFIG
+testit_expect_failure "failexistingspn" $net spn add FOO/bar Guest $CONFIG
+testit "existingspnforce" $net spn add --force FOO/bar Guest $CONFIG
+testit_expect_failure "faildelspnnotgooduser" $net spn delete FOO/bar krbtgt $CONFIG
+testit_expect_failure "faildelspnmoreoneuser" $net spn delete FOO/bar $CONFIG
+testit "deluserspn" $net spn delete FOO/bar Guest $CONFIG
+testit "dellastuserspn" $net spn delete FOO/bar $CONFIG
+testit_expect_failure "faildelspn" $net spn delete FOO/bar $CONFIG
+testit_expect_failure "failaddspn" $net spn add FOO/bar nonexistinguser $CONFIG
+
+exit $failed