From: Samuel Cabrero Date: Fri, 31 Aug 2018 15:07:23 +0000 (+0200) Subject: tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth ccached credentials with... X-Git-Tag: tdb-1.3.17~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06d101e3f087ee82ead8f7792a3ddd2a655b7a4b;p=thirdparty%2Fsamba.git tests/ntlm_auth: Port ntlm_auth tests to python: ntlm_auth ccached credentials with NTLMSSP client and gss-spnego server Port ntlm_auth bash script tests to python Signed-off-by: Samuel Cabrero Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/ntlm_auth.py b/python/samba/tests/ntlm_auth.py index 35895397e53..c3e0dc337ac 100644 --- a/python/samba/tests/ntlm_auth.py +++ b/python/samba/tests/ntlm_auth.py @@ -114,3 +114,24 @@ class NTLMAuthHelpersTests(NTLMAuthTestCase): server_helper="gss-spnego", server_use_winbind=True) self.assertTrue(ret) + + def test_ntlmssp_gss_spnego_cached_creds(self): + """ ntlm_auth with NTLMSSP client and gss-spnego server against + winbind with cached credentials """ + + param = "--ccache-save=%s%s%s%%%s" % (self.domain, + self.winbind_separator, + self.username, + self.password) + cache_cmd = ["wbinfo", + param] + self.check_exit_code(cache_cmd, 0) + + ret = self.run_helper(client_username=self.username, + client_password=self.password, + client_domain=self.domain, + client_use_cached_creds=True, + client_helper="ntlmssp-client-1", + server_helper="gss-spnego", + server_use_winbind=True) + self.assertTrue(ret) diff --git a/source3/script/tests/test_ntlm_auth_s3.sh b/source3/script/tests/test_ntlm_auth_s3.sh index 12bdc65e897..4df0788fa15 100755 --- a/source3/script/tests/test_ntlm_auth_s3.sh +++ b/source3/script/tests/test_ntlm_auth_s3.sh @@ -269,9 +269,6 @@ EOF } # This should work even with NTLMv2 -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` - testit "ntlm_auth against winbindd with require-membership-of" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH --client-username=$USERNAME --client-domain=$DOMAIN --client-password=$PASSWORD --server-use-winbindd $ADDARGS --require-membership-of=$SID || failed=`expr $failed + 1` testit "ntlm_auth with NTLMSSP gss-spnego-client and gss-spnego server against winbind with require-membership-of" $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 --require-membership-of=$SID || failed=`expr $failed + 1`