[2497] in Kerberos
V5 kinit patch: signal error if extra arguments
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Wed Jan 6 16:22:30 1993
Date: 6 Jan 1993 20:58:39 GMT
From: jik@Athena.MIT.EDU (Jonathan I. Kamens)
To: kerberos@shelby.Stanford.EDU
V5 kinit ignores any arguments after the principal. It should report an error.
(because they're probably there because the person running the program put the
arguments in the wrong order and needs to know about it).
This patch won't apply if you haven't applied Barry Jaspan's patch to add
ksrvtgt functionality to kinit, but you can apply it by hand because it's
obvious.
*** 5.24 1992/12/24 21:32:16
--- kinit.c 1993/01/06 20:54:16
***************
*** 155,160 ****
--- 155,166 ----
}
}
+ if (argc - optind > 1) { /* extra arguments */
+ fprintf(stderr, "Extra arguments (starting with \"%s\").\n",
+ argv[optind+1]);
+ errflg++;
+ }
+
if (errflg) {
fprintf(stderr, "Usage: %s [-r time] [-puf] [-l lifetime] [-c cachename] [-k] [-t keytab] [principal]\n", argv[0]);
exit(2);
--
Jonathan Kamens jik@MIT.Edu
Aktis, Inc. Moderator, news.answers