Bug 236896 - kpasswd insists on a valid credentials cache and doesn't use the UID
kpasswd insists on a valid credentials cache and doesn't use the UID
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: krb5 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
Depends On:
Blocks: 248631 563431
  Show dependency treegraph
Reported: 2007-04-18 06:58 EDT by Jatin Nansi
Modified: 2016-01-22 12:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHEA-2007-0788
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-15 11:13:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jatin Nansi 2007-04-18 06:58:31 EDT
Description of problem:
If /usr/kerberos/bin/kpasswd is being run by a user without a valid KRB5
credential cache, it will refuse to run and say

kpasswd: Bad format in credentials cache getting principal from ccache

Documented (man page) behaviour is:
[...] Otherwise, kpasswd uses the principal name from an
existing ccache if there is one; if not, the principal is
derived from the identity of the user invoking the kpasswd

This glitch appears to be due to a bad "expected return value" at 
krb5-1.3.4/src/clients/kpasswd/kpasswd.c:85 - the code checks for
KRB5_CC_NOTFOUND, but actually gets KRB5_CC_FORMAT, which means the check
against the current user's id is never done.

To reproduce (once you have a working Kerberos setup :-):
$ KRB5CCNAME=/dev/null /usr/kerberos/bin/kpasswd
$ kdestroy; /usr/kerberos/bin/kpasswd

$ rpm -qf /usr/kerberos/bin/kpasswd
Comment 9 RHEL Product and Program Management 2007-05-09 00:46:19 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 15 errata-xmlrpc 2007-11-15 11:13:36 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.