Skip to content

Commit

Permalink
Adapt krb5 tests for SLE16
Browse files Browse the repository at this point in the history
  • Loading branch information
ilmanzo committed Feb 12, 2025
1 parent a2e4017 commit e80f7ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/mm_tests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ our @EXPORT = qw(
sub configure_static_network {
my $ip = shift;

configure_default_gateway;
configure_static_ip(ip => $ip);
configure_default_gateway;
configure_static_dns(get_host_resolv_conf());
restart_networking();
assert_script_run "ping -c 1 10.0.2.2 || journalctl -b --no-pager -o short-precise >/dev/$serialdev";
Expand Down
11 changes: 7 additions & 4 deletions tests/security/krb5/krb5_crypt_prepare.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ sub krb5_network_config {
# Append to /etc/hosts
assert_script_run("sed -i \"s/\\($ip.*\$\\)/\\1 $hostname/g\" /etc/hosts");
assert_script_run("cat /etc/hosts");

configure_static_network("$ip/24");
}

Expand Down Expand Up @@ -79,11 +78,15 @@ EOF

mutex_create "KRB5_CLIENT_NETWORK_READY";
}
else { # Avoid misconfigration in lib/main_comman.pm
else { # Avoid misconfiguration in lib/main_common.pm
die "Unrecognized value of SECURITY_TEST";
}

(is_sle('<15')) ? systemctl('stop SuSEfirewall2') : systemctl('stop firewalld');
if (is_sle '<15') {
systemctl('stop SuSEfirewall2');
} elsif (is_sle '<16') {
systemctl('stop firewalld');
} # on SLE16 firewalld is not installed by default

# Prepare krb5 application and config files
zypper_call('ref');
Expand All @@ -102,7 +105,7 @@ EOF
dns_canonicalize_hostname = false
rdns = false
default_realm = EXAMPLE.COM
allow_week_crypto = false
allow_weak_crypto = false
default_tgs_enctypes = $algo
default_tkt_enctypes = $algo
permitted_enctypes = $algo
Expand Down

0 comments on commit e80f7ce

Please sign in to comment.