tests: Use MUST_USE_KERBEROS over AUTO_USE_KERBEROS in auth_log tests
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 15 Jan 2019 23:12:16 +0000 (12:12 +1300)
committerJeremy Allison <jra@samba.org>
Thu, 17 Jan 2019 00:40:31 +0000 (01:40 +0100)
The s3 SMB client bindings seem slightly different to s4, in that they
default to setting the CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS flag.
This seems to fallback to finding a valid KRB TGT (from a previous
successful test), which results in the connection succeeding rather than
failing.

Setting MUST_USE_KERBEROS explicitly avoids this behaviour.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/tests/auth_log.py

index 29976aecbee8623cb4e665b6c31f7db86653daa2..9c93589638e14e0f4f2eedb7a7396688615a3afc 100644 (file)
@@ -752,6 +752,7 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase):
                         "ENC-TS Pre-authentication"))
 
         creds = self.insta_creds(template=self.get_credentials())
+        creds.set_kerberos_state(MUST_USE_KERBEROS)
         creds.set_password("badPassword")
 
         thrown = False
@@ -784,6 +785,7 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase):
                         EVT_LOGON_NETWORK))
 
         creds = self.insta_creds(template=self.get_credentials())
+        creds.set_kerberos_state(MUST_USE_KERBEROS)
         creds.set_username("badUser")
 
         thrown = False