Bug 176035 - kadmin should have more fine-grained exit codes
Summary: kadmin should have more fine-grained exit codes
Alias: None
Product: Fedora
Classification: Fedora
Component: krb5   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brian Brock
Keywords: FutureFeature
Depends On:
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:
Story Points: ---
Clone Of:
Last Closed: 2008-04-09 15:05:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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):

How reproducible:

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

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.