summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-07-12 16:07:25 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-07-25 09:14:19 +0200
commitdc15954196e237d10c0fe3e9dd30316e1704ce25 (patch)
tree3c1a1914ba6126e0b03a7a94e416e5f9151a2449 /source3/client
parent5c178ebc965ed5884082a962ffc86371a448dfa5 (diff)
downloadsamba-dc15954196e237d10c0fe3e9dd30316e1704ce25.tar.gz
s3:client: Use KRB5CCNAME in smbspool_krb5_wrapper if set
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/smbspool_krb5_wrapper.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/client/smbspool_krb5_wrapper.c b/source3/client/smbspool_krb5_wrapper.c
index a72006a4c4f..9a82b2a7b69 100644
--- a/source3/client/smbspool_krb5_wrapper.c
+++ b/source3/client/smbspool_krb5_wrapper.c
@@ -181,6 +181,13 @@ int main(int argc, char *argv[])
return CUPS_BACKEND_FAILED;
}
+ env = getenv("KRB5CCNAME");
+ if (env != NULL && env[0] != 0) {
+ snprintf(gen_cc, sizeof(gen_cc), "%s", env);
+
+ goto create_env;
+ }
+
snprintf(gen_cc, sizeof(gen_cc), "/tmp/krb5cc_%d", uid);
rc = lstat(gen_cc, &sb);
@@ -205,6 +212,7 @@ int main(int argc, char *argv[])
}
}
+create_env:
/*
* Make sure we do not have LD_PRELOAD or other security relevant
* environment variables set.