]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: Cope with LM hash not being stored in the tombstone_reanimation test
authorAndrew Bartlett <abartlet@samba.org>
Tue, 15 Feb 2022 23:56:41 +0000 (12:56 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 17 Mar 2022 01:57:38 +0000 (01:57 +0000)
The removal of LM hash storage changes the expected metadata.

We do not need to track these values exactly to prove the
behaviour here.

This is not due to the changes in password_hash directly, which in
update_final_msg() sets DSDB_FLAG_INTERNAL_FORCE_META_DATA to force
a push out of the removed attribute to the replication state.

However at the stage of a subsequent LDAP Delete there is no longer
a lmPwdHistory nor dBCSPwd attribute, in the directory, so there is
no subsequent version bump to remove them when building a tombstone.

Samba's behaviour is different to that seen by Metze on windows 2022,
where he sees dBCSPwd removed (for the no LM store case) but
lmPwdHistory kept.  We in Samba choose to differ, not storing an
ambiguous LM hsitory (of "" values likely), so allowing any version
for these two attributes is the sensible choice.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
selftest/knownfail.d/lm-hash-support-gone
source4/dsdb/tests/python/tombstone_reanimation.py

index 68d2c41de9bec3c9936428c6406d78b3993fd7cb..0afd5960a0c329e3499c3c72d77d3c7b4f34061b 100644 (file)
@@ -5,6 +5,5 @@
 ^samba.tests.ntlm_auth.samba.tests.ntlm_auth.NTLMAuthHelpersTests.test_diagnostics\(ad_member:local\)
 ^samba.tests.ntlm_auth.samba.tests.ntlm_auth.NTLMAuthHelpersTests.test_diagnostics\(chgdcpass:local\)
 ^samba.tests.ntlm_auth.samba.tests.ntlm_auth.NTLMAuthHelpersTests.test_diagnostics\(rodc:local\)
-^samba4.tombstone_reanimation.python.tombstone_reanimation.RestoreUserPwdObjectTestCase.test_restorepw_user
 ^samba4.rpc.samlogon on ncacn_np with .samlogon\(ad_dc_slowtests\)
 ^samba.tests.auth_log_pass_change.samba.tests.auth_log_pass_change.AuthLogPassChangeTests.test_rap_change_password\(ad_dc_smb1\)
index 453e378332b42d1cbe4202f088c7cc9c586f26f0..ce3555af3bffe3d48c568557b87480d5a2efabed 100755 (executable)
@@ -663,7 +663,7 @@ class RestoreUserPwdObjectTestCase(RestoredObjectAttributesBaseTestCase):
             (DRSUAPI_ATTID_supplementalCredentials, 2),
             (DRSUAPI_ATTID_objectSid, 1),
             (DRSUAPI_ATTID_accountExpires, 2),
-            (DRSUAPI_ATTID_lmPwdHistory, 2),
+            (DRSUAPI_ATTID_lmPwdHistory, None),
             (DRSUAPI_ATTID_sAMAccountName, 1),
             (DRSUAPI_ATTID_sAMAccountType, 2),
             (DRSUAPI_ATTID_lastKnownParent, 1),
@@ -725,7 +725,7 @@ class RestoreUserPwdObjectTestCase(RestoredObjectAttributesBaseTestCase):
             (DRSUAPI_ATTID_objectSid, 1),
             (DRSUAPI_ATTID_adminCount, 1),
             (DRSUAPI_ATTID_accountExpires, 3),
-            (DRSUAPI_ATTID_lmPwdHistory, 3),
+            (DRSUAPI_ATTID_lmPwdHistory, None),
             (DRSUAPI_ATTID_sAMAccountName, 1),
             (DRSUAPI_ATTID_sAMAccountType, 3),
             (DRSUAPI_ATTID_lastKnownParent, 1),