1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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 <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andrew Bartlett 2022-02-16 12:56:41 +13:00
parent f161e3f18f
commit 45af51fd6e
2 changed files with 2 additions and 3 deletions

View 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\)

View File

@ -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),