Bug 264188 - kinit(1): Ignores KRB5CCNAME environment variable if /tmp/krb5cc_%{uid} exists
Summary: kinit(1): Ignores KRB5CCNAME environment variable if /tmp/krb5cc_%{uid} exists
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.3-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-05-23 20:18 UTC by kod1976
Modified: 2022-05-24 00:41 UTC (History)
0 users

See Also:
koobs: mfc-stable13?
koobs: mfc-stable12?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kod1976 2022-05-23 20:18:35 UTC
Environment KRB5CCNAME specifies the default credentials cache according to manual page. But it is ignored if file /tmp/krb5cc_%{uid} exist and contain valid ticket (even expired one) for principal.

For example:

# printenv | grep KRB5CCNAME
# kinit some_principal
# ls -la /tmp/krb5cc_0
-rw-------   1 root  wheel    2071 May 23 16:57 krb5cc_0
# setenv KRB5CCNAME /tmp/krb5cc_test
# kinit some_principal
# ls -la /tmp/krb5cc_test
ls: /tmp/krb5cc_test: No such file or directory
# ls -la /tmp/krb5cc_0
-rw-------  1 root  wheel  2071 May 23 17:00 /tmp/krb5cc_0
# rm /tmp/krb5cc_0
# kinit some_principal
# ls -la /tmp/krb5cc_test
-rw-------  1 root  wheel  2071 May 23 17:03 /tmp/krb5cc_test