mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
selftest: Avoid system krb5.conf in "none" test env
Some torture tests do not perform Kerberos activity and do not run against a server (hence the "none" test env), but do create a krb5 context, and that causes the Kerberos libs to read krb5.conf and choke if they don't understand it. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
8d3106b1a4
commit
f9d6be3b74
@ -831,9 +831,7 @@ sub setup_env($$)
|
|||||||
|
|
||||||
$option = "client" if $option eq "";
|
$option = "client" if $option eq "";
|
||||||
|
|
||||||
if ($envname eq "none") {
|
if (defined(get_running_env($envname))) {
|
||||||
$testenv_vars = {};
|
|
||||||
} elsif (defined(get_running_env($envname))) {
|
|
||||||
$testenv_vars = get_running_env($envname);
|
$testenv_vars = get_running_env($envname);
|
||||||
if (not $testenv_vars->{target}->check_env($testenv_vars)) {
|
if (not $testenv_vars->{target}->check_env($testenv_vars)) {
|
||||||
print $testenv_vars->{target}->getlog_env($testenv_vars);
|
print $testenv_vars->{target}->getlog_env($testenv_vars);
|
||||||
@ -901,7 +899,6 @@ sub getlog_env($)
|
|||||||
sub check_env($)
|
sub check_env($)
|
||||||
{
|
{
|
||||||
my ($envname) = @_;
|
my ($envname) = @_;
|
||||||
return 1 if ($envname eq "none");
|
|
||||||
my $env = get_running_env($envname);
|
my $env = get_running_env($envname);
|
||||||
return $env->{target}->check_env($env);
|
return $env->{target}->check_env($env);
|
||||||
}
|
}
|
||||||
|
@ -1999,8 +1999,11 @@ sub getlog_env($$)
|
|||||||
sub check_env($$)
|
sub check_env($$)
|
||||||
{
|
{
|
||||||
my ($self, $envvars) = @_;
|
my ($self, $envvars) = @_;
|
||||||
|
my $samba_pid = $envvars->{SAMBA_PID};
|
||||||
|
|
||||||
my $childpid = Samba::cleanup_child($envvars->{SAMBA_PID}, "samba");
|
return 1 if $samba_pid == -1;
|
||||||
|
|
||||||
|
my $childpid = Samba::cleanup_child($samba_pid, "samba");
|
||||||
|
|
||||||
return ($childpid == 0);
|
return ($childpid == 0);
|
||||||
}
|
}
|
||||||
@ -2077,6 +2080,8 @@ sub setup_env($$$)
|
|||||||
}
|
}
|
||||||
return $target3->setup_admember_rfc2307("$path/ad_member_rfc2307",
|
return $target3->setup_admember_rfc2307("$path/ad_member_rfc2307",
|
||||||
$self->{vars}->{ad_dc_ntvfs}, 34);
|
$self->{vars}->{ad_dc_ntvfs}, 34);
|
||||||
|
} elsif ($envname eq "none") {
|
||||||
|
return $self->setup_none("$path/none");
|
||||||
} else {
|
} else {
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
@ -2479,4 +2484,14 @@ sub setup_ad_dc($$)
|
|||||||
return $env;
|
return $env;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub setup_none($$)
|
||||||
|
{
|
||||||
|
my ($self, $path) = @_;
|
||||||
|
|
||||||
|
my $ret = {
|
||||||
|
KRB5_CONFIG => abs_path($path) . "/no_krb5.conf",
|
||||||
|
SAMBA_PID => -1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user