tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth with NTLMSSP gss-spnego...
authorSamuel Cabrero <scabrero@suse.de>
Fri, 31 Aug 2018 14:42:05 +0000 (16:42 +0200)
committerNoel Power <npower@samba.org>
Wed, 19 Dec 2018 11:42:10 +0000 (12:42 +0100)
Port ntlm_auth bash script tests to python

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/ntlm_auth.py
source3/script/tests/test_ntlm_auth_s3.sh

index 525dad12eb59b9f48265d483151873d503730999..35895397e53e1d2c5f96a8323be31aefce784030 100644 (file)
@@ -102,3 +102,15 @@ class NTLMAuthHelpersTests(NTLMAuthTestCase):
                               server_helper="gss-spnego",
                               server_use_winbind=False)
         self.assertTrue(ret)
+
+    def test_gss_spnego_winbind(self):
+        """ ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server
+        against winbind """
+
+        ret = self.run_helper(client_username=self.username,
+                              client_password=self.password,
+                              client_domain=self.domain,
+                              client_helper="gss-spnego-client",
+                              server_helper="gss-spnego",
+                              server_use_winbind=True)
+        self.assertTrue(ret)
index 2b9b87e75b033b2bdfb43f3168bff78837ab9dd2..12bdc65e89733dd73205c60c19283b50ddbe226d 100755 (executable)
@@ -269,8 +269,6 @@ EOF
 }
 
 # This should work even with NTLMv2
-testit "ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server against winbind" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH --client-username=$USERNAME --client-domain=$DOMAIN --client-password=$PASSWORD --server-use-winbindd --client-helper=gss-spnego-client --server-helper=gss-spnego $ADDARGS || failed=`expr $failed + 1`
-
 testit "wbinfo store cached credentials" $BINDIR/wbinfo --ccache-save=$DOMAIN/$USERNAME%$PASSWORD || failed=`expr $failed + 1`
 testit "ntlm_auth ccached credentials with NTLMSSP client and gss-spnego server" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH $ADDARGS --client-username=$USERNAME --client-domain=$DOMAIN --client-use-cached-creds --client-helper=ntlmssp-client-1 --server-helper=gss-spnego --server-use-winbindd || failed=`expr $failed + 1`