Bug 176035 - kadmin should have more fine-grained exit codes
kadmin should have more fine-grained exit codes
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: krb5 (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-17 19:39 EST by W. Michael Petullo
Modified: 2008-04-09 11:05 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-09 11:05:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description W. Michael Petullo 2005-12-17 19:39:41 EST
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@FLYN.ORG with password.
get_principal: Principal does not exist while retrieving "foo@FLYN.ORG".
[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 09:25:26 EST
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.