diff options
author | Stefan Metzmacher <metze@samba.org> | 2016-12-16 11:09:16 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-12-17 22:58:28 +0100 |
commit | f09f5ae631c64da016072b1c09c172f4673a06cd (patch) | |
tree | 38c44ba63054ec3fdb899516cfb47838d4f1f991 /selftest/selftest.pl | |
parent | cbbd95c7f23787263e5d07b765b1d9cde01bd6b1 (diff) | |
download | samba-f09f5ae631c64da016072b1c09c172f4673a06cd.tar.gz |
selftest: make sure we always export KRB5CCNAME
We should not risk the usage of the users global ccache!
This results in unpredictable effects for the user and
selftest itself.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Dec 17 22:58:28 CET 2016 on sn-devel-144
Diffstat (limited to 'selftest/selftest.pl')
-rwxr-xr-x | selftest/selftest.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl index d707d25419e..c54ea68cac2 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -668,6 +668,9 @@ if ($opt_quick) { } $ENV{SELFTEST_MAXTIME} = $torture_maxtime; +my $selftest_krbt_ccache_path = "$tmpdir_abs/selftest.krb5_ccache"; +$ENV{KRB5CCNAME} = "FILE:${selftest_krbt_ccache_path}.global"; + my @available = (); foreach my $fn (@testlists) { foreach (read_testlist($fn)) { @@ -886,6 +889,8 @@ sub setup_env($$) $option = "client" if $option eq ""; + $ENV{KRB5CCNAME} = "FILE:${selftest_krbt_ccache_path}.${envname}/ignore"; + if (defined(get_running_env($envname))) { $testenv_vars = get_running_env($envname); if (not $testenv_vars->{target}->check_env($testenv_vars)) { @@ -927,6 +932,9 @@ sub setup_env($$) } } + my $krb5_ccache_path = "${selftest_krbt_ccache_path}.${envname}.${option}"; + unlink($krb5_ccache_path); + $ENV{KRB5CCNAME} = "FILE:${krb5_ccache_path}"; return $testenv_vars; } |