Revert "s3:selftest: create BUILTIN\\Administrators at startup"
authorStefan Metzmacher <metze@samba.org>
Tue, 3 Feb 2009 16:05:24 +0000 (17:05 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 3 Feb 2009 16:07:44 +0000 (17:07 +0100)
This reverts commit a849183f9492d09ccd7e273f955d4d8f2668fdf3.

This is to racy for most of the build-farm machines,
because winbindd doesn't start fast enough.

metze

source3/script/tests/selftest.sh
source3/script/tests/test_net_registry.sh

index c02e0ee1830984753d581cff213321fd3a3d4830..94621841f55c1f1e60d7bab570f9dfd4c14e1cef 100755 (executable)
@@ -345,13 +345,6 @@ 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
index a3d1a24fd81e3ff496cb482d06a020ba1cb04864..52a78bc339f9af068770f205b934c222dc9e72f9 100755 (executable)
@@ -7,10 +7,8 @@ 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="${NETREMOTE} rpc registry"
+       NETREG="${NET} -U${USERNAME}%${PASSWORD} -I ${SERVER_IP} rpc registry"
 else
        NETREG="${NET} registry"
 fi
@@ -336,7 +334,14 @@ test_setvalue_twice()
 
 give_administrative_rights()
 {
-       ${NETREMOTE} rpc group addmem BUILTIN\\Administrators $USERNAME
+       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
        if test "x$?" != "x0" ; then
                echo "ERROR: adding user $USERNAME to BUILTIN\\Administrators"
                false
@@ -347,7 +352,7 @@ give_administrative_rights()
 
 take_administrative_rights()
 {
-       ${NETREMOTE} rpc group delmem BUILTIN\\Administrators $USERNAME
+       bin/net -s $SERVERCONFFILE sam delmem BUILTIN\\Administrators $USERNAME
        if test "x$?" != "x0" ; then
                echo "ERROR: removing user $USERNAME from BUILTIN\\Administrators"
                false