Bug 236896

Summary: kpasswd insists on a valid credentials cache and doesn't use the UID
Product: Red Hat Enterprise Linux 4 Reporter: Jatin Nansi <jnansi>
Component: krb5Assignee: Nalin Dahyabhai <nalin>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: cward, jplans
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHEA-2007-0788 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:13:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 248631, 563431    

Description Jatin Nansi 2007-04-18 10:58:31 UTC
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
command.

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
or
$ kdestroy; /usr/kerberos/bin/kpasswd

Version:
$ rpm -qf /usr/kerberos/bin/kpasswd
krb5-workstation-1.3.4-33

Comment 9 RHEL Program Management 2007-05-09 04:46:19 UTC
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
release.

Comment 15 errata-xmlrpc 2007-11-15 16:13:36 UTC
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.

http://rhn.redhat.com/errata/RHEA-2007-0788.html