From: Andrew Bartlett Date: Tue, 15 Feb 2022 23:56:41 +0000 (+1300) Subject: selftest: Cope with LM hash not being stored in the tombstone_reanimation test X-Git-Tag: tevent-0.12.0~402 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45af51fd6e1fc29dfc682c778ea9e19762892cd2;p=thirdparty%2Fsamba.git selftest: Cope with LM hash not being stored in the tombstone_reanimation test 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 Reviewed-by: Stefan Metzmacher --- diff --git a/selftest/knownfail.d/lm-hash-support-gone b/selftest/knownfail.d/lm-hash-support-gone index 68d2c41de9b..0afd5960a0c 100644 --- a/selftest/knownfail.d/lm-hash-support-gone +++ b/selftest/knownfail.d/lm-hash-support-gone @@ -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\) diff --git a/source4/dsdb/tests/python/tombstone_reanimation.py b/source4/dsdb/tests/python/tombstone_reanimation.py index 453e378332b..ce3555af3bf 100755 --- a/source4/dsdb/tests/python/tombstone_reanimation.py +++ b/source4/dsdb/tests/python/tombstone_reanimation.py @@ -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),