Skip Menu |

Subject: kdb5_util errors on command arguments matching command names
kdb5_util's top-level argv loop continues parsing command-line
arguments after it finds the command name. This is probably
intentional, so that global options like "-r realm" can appear before
or after the command name. However, if any of the command arguments
happen to match a command name, usage() is called with no explanation.

I ran into this when running trying to load a dump file named "dump"
with "kdb5_util load dump".
Subject: git commit

Simplify kdb5_util global argv processing

kdb5_util could issue an unexplained error if a command argument
matched a command name, such as when trying to load a dump file named
"dump". It could also mysteriously work if the command name and its
arguments were misordered, such as "kdb5_util kdb.dump load".

In the main option loop, build cmd_argv without special-casing command
names; then look up cmd_argv[0] after the loop.
Author: Greg Hudson <>
Commit: f5397f358b16a42e570e0a0553099bc58ff799e0
Branch: master
src/kadmin/dbutil/kdb5_util.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)