[28804] in CVS-changelog-for-Kerberos-V5
krb5 commit [krb5-1.11]: Parse "ktadd -norandkey" in remote kadmin
daemon@ATHENA.MIT.EDU (Tom Yu)
Sat Feb 14 16:21:09 2015
Date: Sat, 14 Feb 2015 16:19:12 -0500
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201502142119.t1ELJCYk032361@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/b32f7131bb46154f16e127a8b61b06206c6acca3
commit b32f7131bb46154f16e127a8b61b06206c6acca3
Author: Tom Yu <tlyu@mit.edu>
Date: Thu Oct 16 15:40:33 2014 -0400
Parse "ktadd -norandkey" in remote kadmin client
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: 8148 (new)
version_fixed: 1.11.6
status: resolved
src/kadmin/cli/keytab.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/kadmin/cli/keytab.c b/src/kadmin/cli/keytab.c
index 6d7288f..5807879 100644
--- a/src/kadmin/cli/keytab.c
+++ b/src/kadmin/cli/keytab.c
@@ -52,9 +52,7 @@ static char *etype_string(krb5_enctype enctype);
static int quiet;
-#ifdef KADMIN_LOCAL
static int norandkey;
-#endif
static void
add_usage()
@@ -135,9 +133,7 @@ kadmin_keytab_add(int argc, char **argv)
argc--; argv++;
quiet = 0;
-#ifdef KADMIN_LOCAL
norandkey = 0;
-#endif
while (argc) {
if (strncmp(*argv, "-k", 2) == 0) {
argc--; argv++;
@@ -148,9 +144,13 @@ kadmin_keytab_add(int argc, char **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--;
@@ -176,13 +176,11 @@ kadmin_keytab_add(int argc, char **argv)
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;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5