aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-01-25 14:53:13 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-01-25 14:53:13 -0500
commit820aa9ef4c357d540d21b17f2bf518d7ff2d9b12 (patch)
tree332145a171a51bf6ec24e3e7c06634a24029b4e8 /src
parent4641b2a30f0a2353e875cba48193e33d8ca0b173 (diff)
downloadpostgresql-820aa9ef4c357d540d21b17f2bf518d7ff2d9b12.tar.gz
postgresql-820aa9ef4c357d540d21b17f2bf518d7ff2d9b12.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/test/kerberos/t/001_auth.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl
index b3aeea9574b..d476a7800e7 100644
--- a/src/test/kerberos/t/001_auth.pl
+++ b/src/test/kerberos/t/001_auth.pl
@@ -67,6 +67,7 @@ my $realm = 'EXAMPLE.COM';
my $krb5_conf = "${TestLib::tmp_check}/krb5.conf";
my $kdc_conf = "${TestLib::tmp_check}/kdc.conf";
+my $krb5_cache = "${TestLib::tmp_check}/krb5cc";
my $krb5_log = "${TestLib::log_path}/krb5libs.log";
my $kdc_log = "${TestLib::log_path}/krb5kdc.log";
my $kdc_port = get_free_port();
@@ -134,8 +135,10 @@ $realm = {
mkdir $kdc_datadir or die;
+# Ensure that we use test's config and cache files, not global ones.
$ENV{'KRB5_CONFIG'} = $krb5_conf;
$ENV{'KRB5_KDC_PROFILE'} = $kdc_conf;
+$ENV{'KRB5CCNAME'} = $krb5_cache;
my $service_principal = "$ENV{with_krb_srvnam}/$host";