The remote kadmin client would not parse the "-norandkey" option to
the ktadd subcommand, terminating option parsing and possibly causing
options to be interpreted as principal names.
(cherry picked from commit
13e9694b17945d43d0cfc203b2645204f2d87086)
ticket: 8131 (new)
version_fixed: 1.12.3
status: resolved
static int quiet;
-#ifdef KADMIN_LOCAL
static int norandkey;
-#endif
static void
add_usage()
argc--; argv++;
quiet = 0;
-#ifdef KADMIN_LOCAL
norandkey = 0;
-#endif
while (argc) {
if (strncmp(*argv, "-k", 2) == 0) {
argc--; argv++;
keytab_str = *argv;
} else if (strcmp(*argv, "-q") == 0) {
quiet++;
-#ifdef KADMIN_LOCAL
} else if (strcmp(*argv, "-norandkey") == 0) {
+#ifdef KADMIN_LOCAL
norandkey++;
+#else
+ fprintf(stderr,
+ _("-norandkey option only valid for kadmin.local\n"));
+ return;
#endif
} else if (strcmp(*argv, "-e") == 0) {
argc--;
return;
}
-#ifdef KADMIN_LOCAL
if (norandkey && ks_tuple) {
fprintf(stderr,
_("cannot specify keysaltlist when not changing key\n"));
return;
}
-#endif
if (process_keytab(context, &keytab_str, &keytab))
return;