summaryrefslogtreecommitdiff
path: root/source3/script/tests
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-28 17:24:38 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-28 17:32:50 +0100
commita849183f9492d09ccd7e273f955d4d8f2668fdf3 (patch)
treeb4dde1b329f3d50bc81c7219981d8ada4d5026d0 /source3/script/tests
parentd6497aa0894b20392d759e1762ad1bb6ab29f5c8 (diff)
downloadsamba-a849183f9492d09ccd7e273f955d4d8f2668fdf3.tar.gz
samba-a849183f9492d09ccd7e273f955d4d8f2668fdf3.tar.bz2
samba-a849183f9492d09ccd7e273f955d4d8f2668fdf3.zip
s3:selftest: create BUILTIN\\Administrators at startup
And add and remove the alias member via net rpc group instead of net sam. metze
Diffstat (limited to 'source3/script/tests')
-rwxr-xr-xsource3/script/tests/selftest.sh7
-rwxr-xr-xsource3/script/tests/test_net_registry.sh15
2 files changed, 12 insertions, 10 deletions
diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index 94621841f5..c02e0ee183 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -345,6 +345,13 @@ START=`date`
bin/smbclient $CONFIGURATION -L $SERVER_IP -U% -p 139 | head -2
MAKE_TEST_BINARY=""
+ MAKE_TEST_BINARY="bin/net"
+ printf "%s" "creating BUILTIN\\Administrators..."
+ bin/net -s $SERVERCONFFILE sam createbuiltingroup \
+ Administrators > /dev/null 2>&1 || exit 1
+ echo "DONE"
+ MAKE_TEST_BINARY=""
+
failed=0
. $SCRIPTDIR/tests_$SUBTESTS.sh
diff --git a/source3/script/tests/test_net_registry.sh b/source3/script/tests/test_net_registry.sh
index e9f56a2cf2..22081ec2f6 100755
--- a/source3/script/tests/test_net_registry.sh
+++ b/source3/script/tests/test_net_registry.sh
@@ -7,8 +7,10 @@ RPC="$1"
NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
+NETREMOTE="${NET} -U${USERNAME}%${PASSWORD} -S ${SERVER} -I ${SERVER_IP}"
+
if test "x${RPC}" = "xrpc" ; then
- NETREG="${NET} -U${USERNAME}%${PASSWORD} -I ${SERVER_IP} rpc registry"
+ NETREG="${NETREMOTE} rpc registry"
else
NETREG="${NET} registry"
fi
@@ -332,14 +334,7 @@ test_setvalue_twice()
give_administrative_rights()
{
- bin/net -s $SERVERCONFFILE sam createbuiltingroup Administrators
- if test "x$?" != "x0" ; then
- echo "ERROR: creating builtin group Administrators"
- false
- return
- fi
-
- bin/net -s $SERVERCONFFILE sam addmem BUILTIN\\Administrators $USERNAME
+ ${NETREMOTE} rpc group addmem BUILTIN\\Administrators $USERNAME
if test "x$?" != "x0" ; then
echo "ERROR: adding user $USERNAME to BUILTIN\\Administrators"
false
@@ -350,7 +345,7 @@ give_administrative_rights()
take_administrative_rights()
{
- bin/net -s $SERVERCONFFILE sam delmem BUILTIN\\Administrators $USERNAME
+ ${NETREMOTE} rpc group delmem BUILTIN\\Administrators $USERNAME
if test "x$?" != "x0" ; then
echo "ERROR: removing user $USERNAME from BUILTIN\\Administrators"
false