Article View: comp.protocols.kerberos
Article #918V5 kinit patch: signal error if extra arguments
From: Jonathan I. Kamens
Date: Wed, 06 Jan 1993 20:58
Date: Wed, 06 Jan 1993 20:58
30 lines
1497 bytes
1497 bytes
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
Technical Details
Message-ID:
<1ifh5vINNslp@senator-bedfellow.MIT.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!enterpoop.mit.edu!senator-bedfellow.mit.edu!athena.mit.edu!jikShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!enterpoop.mit.edu!senator-bedfellow.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.protocols.kerberos Subject: V5 kinit patch: signal error if extra arguments Date: 6 Jan 1993 20:58:39 GMT Organization: Massachusetts Institute of Technology Lines: 30 Distribution: world Message-ID: <1ifh5vINNslp@senator-bedfellow.MIT.EDU> NNTP-Posting-Host: pit-manager.mit.edu