Bug 176035 - kadmin should have more fine-grained exit codes
Summary: kadmin should have more fine-grained exit codes
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: krb5
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-18 00:39 UTC by W. Michael Petullo
Modified: 2008-04-09 15:05 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-09 15:05:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description W. Michael Petullo 2005-12-18 00:39:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.12) Gecko/20051018 Epiphany/1.9.2

Description of problem:
I am trying to write a shell script that does something if a Kerberos principal exists.  However, kadmin makes it difficult to check if a principal exists.  "kadmin -q 'getprinc foo'" exits with a code of "0" whether or not the principal exists.

Version-Release number of selected component (if applicable):
krb5-server-1.4.1-5

How reproducible:
Always

Steps to Reproduce:
[root@golem scripts]# kadmin.local -q "getprinc foo"
Authenticating as principal mike/admin with password.
get_principal: Principal does not exist while retrieving "foo".
[root@golem scripts]# echo $?
0
 

Actual Results:  Exit status is always 0.

Expected Results:  I think the program should exist with a non-zero status code if a queried principal does not exist.

Additional info:

Comment 1 W. Michael Petullo 2005-12-29 14:25:26 UTC
After looking at the kadmin code, this does not seem to be as simple to 
implement as I thought it would be.  However, I think this may still be a 
worthwhile feature.  The bottom line is that it seems difficult to execute 
kerberos commands from a shell script and determine if they succeed or fail.


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