s3-param: Add "server role" as global parameter
[samba.git] / wintest / wintest.py
index 2a6da7d6567abc065bb5d8a4a13106eff075f7e4..d5728a883b5a7a9d2548b21175cacfdeeea510a4 100644 (file)
@@ -571,13 +571,13 @@ options {
     def run_tlntadmn(self, child):
         '''remove the annoying telnet restrictions'''
         child.sendline('tlntadmn config maxconn=1024')
-        child.expect("The settings were successfully updated")
+        child.expect(["The settings were successfully updated", "Access is denied"])
         child.expect("C:")
 
     def disable_firewall(self, child):
         '''remove the annoying firewall'''
         child.sendline('netsh advfirewall set allprofiles state off')
-        i = child.expect(["Ok", "The following command was not found: advfirewall set allprofiles state off"])
+        i = child.expect(["Ok", "The following command was not found: advfirewall set allprofiles state off", "The requested operation requires elevation"])
         child.expect("C:")
         if i == 1:
             child.sendline('netsh firewall set opmode mode = DISABLE profile = ALL')
@@ -845,6 +845,13 @@ RebootOnCompletion=No
         self.cmd_contains("bin/smbclient --version", ["${SAMBA_VERSION}"])
         self.retry_cmd('bin/smbclient -L ${WIN_HOSTNAME} -U%s%%%s %s' % (username, password, args), ["IPC"])
 
+    def test_net_use(self, vm, domain, username, password):
+        self.setwinvars(vm)
+        self.info('Testing net use against Samba3 member')
+        child = self.open_telnet("${WIN_HOSTNAME}", "%s\\%s" % (domain, username), password)
+        child.sendline("net use t: \\\\${HOSTNAME}.${LCREALM}\\test")
+        child.expect("The command completed successfully")
+
 
     def setup(self, testname, subdir):
         '''setup for main tests, parsing command line'''