From: Andrew Bartlett Date: Thu, 29 Sep 2022 01:54:14 +0000 (+1300) Subject: selftest: Enable "old Samba" mode regarding GET_ANC/GET_TGT X-Git-Tag: talloc-2.4.0~775 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b0bbc94d4124d63b1d5a35ccbc88ffd51d520ba0;p=thirdparty%2Fsamba.git selftest: Enable "old Samba" mode regarding GET_ANC/GET_TGT The chgdcpass server now emulates older verions of Samba that fail to implement DRSUAPI_DRS_GET_ANC correctly and totally fails to support DRSUAPI_DRS_GET_TGT. We now show this is in effect by the fact that tests now fail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15189 Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/selftest/knownfail.d/samba-4.5-emulation b/selftest/knownfail.d/samba-4.5-emulation index 82959240588..37baa41822c 100644 --- a/selftest/knownfail.d/samba-4.5-emulation +++ b/selftest/knownfail.d/samba-4.5-emulation @@ -1,2 +1,5 @@ # This fails as there is no second DC in this enviroment, so it is always the owner -samba4.drs.getnc_exop.python\(chgdcpass\).getnc_exop.DrsReplicaSyncTestCase.test_FSMONotOwner\(chgdcpass\) \ No newline at end of file +samba4.drs.getnc_exop.python\(chgdcpass\).getnc_exop.DrsReplicaSyncTestCase.test_FSMONotOwner\(chgdcpass\) +# This fails because GET_ANC is now poorly implemented (matching Samba 4.5) +^samba4.drs.getnc_exop.python\(chgdcpass\).getnc_exop.DrsReplicaSyncTestCase.test_link_utdv_hwm\(chgdcpass\) +^samba4.drs.samba_tool_drs_critical.python\(chgdcpass\).samba_tool_drs_critical.SambaToolDrsTests.test_samba_tool_drs_clone_dc_critical_object_chain\(chgdcpass:local\) \ No newline at end of file diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index e5ae57cb7fc..dcf00e85e9c 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -2054,10 +2054,22 @@ sub provision_chgdcpass($$) # This environment disallows the use of this password # (and also removes the default AD complexity checks) my $unacceptable_password = "Paßßword-widk3Dsle32jxdBdskldsk55klASKQ"; + + # This environment also sets some settings that are unusual, + # to test specific behaviours. In particular, this + # environment fails to correctly support DRSUAPI_DRS_GET_ANC + # like Samba before 4.5 and DRSUAPI_DRS_GET_TGT before 4.8 + # + # Additionally, disabling DRSUAPI_DRS_GET_TGT causes all links + # to be sent last (in the final chunk), which is like Samba + # before 4.8. + my $extra_smb_conf = " check password script = $self->{srcdir}/selftest/checkpassword_arg1.sh ${unacceptable_password} allow dcerpc auth level connect:lsarpc = yes dcesrv:max auth states = 8 + drs:broken_samba_4.5_get_anc_emulation = true + drs:get_tgt_support = false "; my $extra_provision_options = ["--dns-backend=BIND9_DLZ"]; my $ret = $self->provision($prefix,