]> git.ipfire.org Git - thirdparty/krb5.git/commit
Support kadmin script mode
authorGreg Hudson <ghudson@mit.edu>
Fri, 30 Jan 2015 17:48:15 +0000 (12:48 -0500)
committerGreg Hudson <ghudson@mit.edu>
Thu, 19 Feb 2015 16:57:18 +0000 (11:57 -0500)
commit040fe97758bdf53b6c00815b0306410eb88ea5ec
treeb658c1a46d634e64f3ed243565615389d860f59e
parent102bb6ebf20f9174130c85c3b052ae104e5073ec
Support kadmin script mode

Add support for a command and argments to be specified on the kadmin
command line, with script-friendly behavior.  kadmin_startup() now
yields either a request string or a request argv array, and sets
script_mode in the argv array case.  Informational messages now go
through info() and are suppressed if script_mode is set.  Prompts and
warning messages are also suppressed in script mode.  Error messages
indicating a failure now go through error() and set exit_status if
script_mode is set.  The extended com_err() hook is always installed
so that com_err messages go through error() and set exit_status.

getopt() is now invoked with a leading '+' to suppress Gnu getopt
argument reordering behavior, so that invokers don't need to pass "--"
to prevent query options from being treated as kadmin options.
Non-Gnu getopt implementations should harmlessly treat '+' as a valid
flag option, which has no effect as it will reach the same default
label in the switch statement.

ticket: 7991
doc/admin/admin_commands/kadmin_local.rst
src/kadmin/cli/kadmin.c
src/kadmin/cli/kadmin.h
src/kadmin/cli/ss_wrapper.c