summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorIsaac Boukris <iboukris@gmail.com>2020-05-04 18:09:53 +0200
committerAndrew Bartlett <abartlet@samba.org>2020-05-15 12:25:40 +0000
commit8b5e7644130146bcc4e5a0dd05da6458a6025dd8 (patch)
tree1a3317cdfa0ce0e0681ebe63c2993b457e13e45e /selftest
parent19875a37318a7cd5585572616cf12a775591193f (diff)
downloadsamba-8b5e7644130146bcc4e5a0dd05da6458a6025dd8.tar.gz
selftest: add python S4U2Self tests including unkeyed checksums
To test the CRC32 I reverted the unkeyed-checksum fix (43958af1) and the weak-crypto fix (389d1b97). Note that the unkeyed-md5 still worked even with weak-crypto disabled, and that the unkeyed-sha1 never worked but I left it anyway. Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri May 15 12:25:40 UTC 2020 on sn-devel-184
Diffstat (limited to 'selftest')
-rw-r--r--selftest/knownfail2
-rw-r--r--selftest/skip_mit_kdc1
-rwxr-xr-xselftest/target/Samba4.pm23
3 files changed, 26 insertions, 0 deletions
diff --git a/selftest/knownfail b/selftest/knownfail
index 57a4d93a37d..38e8597deda 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -393,3 +393,5 @@
^samba.tests.ntlmdisabled.python\(ktest\).python2.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\)
^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python3.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\)
^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python2.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\)
+# Fixed upstream heimdal in PR #439
+^samba.tests.krb5.s4u_tests.samba.tests.krb5.s4u_tests.S4UKerberosTests.test_s4u2self_hmac_md5_checksum
diff --git a/selftest/skip_mit_kdc b/selftest/skip_mit_kdc
index 4a51c98ea0b..ea644638c9f 100644
--- a/selftest/skip_mit_kdc
+++ b/selftest/skip_mit_kdc
@@ -3,3 +3,4 @@
.*RODC
^samba4.ntvfs.cifs.ntlm.base.unlink
^samba4.ntvfs.cifs.krb5.base.unlink
+^samba.tests.krb5.s4u_tests
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 2046af3b984..34dd0ee798d 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -934,6 +934,29 @@ sub provision_raw_step2($$$)
return undef;
}
+ my $srv_account = "srv_account";
+ $samba_tool_cmd = "";
+ $samba_tool_cmd .= "RESOLV_CONF=\"$ret->{RESOLV_CONF}\" ";
+ $samba_tool_cmd .= "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";
+ $samba_tool_cmd .= "KRB5CCNAME=\"$ret->{KRB5_CCACHE}\" ";
+ $samba_tool_cmd .= Samba::bindir_path($self, "samba-tool")
+ . " user create --configfile=$ctx->{smb_conf} $srv_account $ctx->{password}";
+ unless (system($samba_tool_cmd) == 0) {
+ warn("Unable to add $srv_account user: \n$samba_tool_cmd\n");
+ return undef;
+ }
+
+ $samba_tool_cmd = "";
+ $samba_tool_cmd .= "RESOLV_CONF=\"$ret->{RESOLV_CONF}\" ";
+ $samba_tool_cmd .= "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";
+ $samba_tool_cmd .= "KRB5CCNAME=\"$ret->{KRB5_CCACHE}\" ";
+ $samba_tool_cmd .= Samba::bindir_path($self, "samba-tool")
+ . " spn add HOST/$srv_account --configfile=$ctx->{smb_conf} $srv_account";
+ unless (system($samba_tool_cmd) == 0) {
+ warn("Unable to add spn for $srv_account: \n$samba_tool_cmd\n");
+ return undef;
+ }
+
my $ldbmodify = "";
$ldbmodify .= "RESOLV_CONF=\"$ret->{RESOLV_CONF}\" ";
$ldbmodify .= "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";