Skip to content

Commit b8894a3

Browse files
committed
Don't clobber the calling user's credentials cache in Kerberos test.
Embarrassing oversight in this test script, which fortunately is not run by default. Report and patch by Jacob Champion. Discussion: https://postgr.es/m/1fcb175bafef6560f47a8c31229fa7c938486b8d.camel@vmware.com
1 parent a7cdd3f commit b8894a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/kerberos/t/001_auth.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
my $krb5_conf = "${TestLib::tmp_check}/krb5.conf";
5656
my $kdc_conf = "${TestLib::tmp_check}/kdc.conf";
57+
my $krb5_cache = "${TestLib::tmp_check}/krb5cc";
5758
my $krb5_log = "${TestLib::log_path}/krb5libs.log";
5859
my $kdc_log = "${TestLib::log_path}/krb5kdc.log";
5960
my $kdc_port = get_free_port();
@@ -121,8 +122,10 @@
121122

122123
mkdir $kdc_datadir or die;
123124

125+
# Ensure that we use test's config and cache files, not global ones.
124126
$ENV{'KRB5_CONFIG'} = $krb5_conf;
125127
$ENV{'KRB5_KDC_PROFILE'} = $kdc_conf;
128+
$ENV{'KRB5CCNAME'} = $krb5_cache;
126129

127130
my $service_principal = "$ENV{with_krb_srvnam}/$host";
128131

0 commit comments

Comments
 (0)