To: | krb5-bugs@MIT.EDU |
Subject: | kadmin arg parsing |
From: | Ken Raeburn <raeburn@MIT.EDU> |
Date: | Wed, 21 May 2003 19:28:25 -0400 |
IMNSHO, we should assume that anything starting with a "-" is likely
to be intended as an option and not a name.
kadmin: ank -expire
WARNING: no policy specified for -expire@RAEBURN.ORG; defaulting to no policy
Enter password for principal "-expire@RAEBURN.ORG":
[...]
kadmin: ank --help
WARNING: no policy specified for --help@RAEBURN.ORG; defaulting to no policy
[...]
Yes, it's remotely possible someone might want to create a principal
name starting with a "-". An option that means "the next argument is
the principal name, even if it starts with a dash" would take care of
that. (And thus I set about reinventing some of the Multics argument
parsing conventions. Hmm.)
Also, either "-help" or "--help" should be supported by all of the
kadmin commands. If the response to an unknown "-" option is to print
out a usage message, without complaining that option X is unknown,
that would sort of happen automatically. Complaining that "-help" is
unknown and then printing a usage message would be less optimal, but
would get the job done.
Ken
to be intended as an option and not a name.
kadmin: ank -expire
WARNING: no policy specified for -expire@RAEBURN.ORG; defaulting to no policy
Enter password for principal "-expire@RAEBURN.ORG":
[...]
kadmin: ank --help
WARNING: no policy specified for --help@RAEBURN.ORG; defaulting to no policy
[...]
Yes, it's remotely possible someone might want to create a principal
name starting with a "-". An option that means "the next argument is
the principal name, even if it starts with a dash" would take care of
that. (And thus I set about reinventing some of the Multics argument
parsing conventions. Hmm.)
Also, either "-help" or "--help" should be supported by all of the
kadmin commands. If the response to an unknown "-" option is to print
out a usage message, without complaining that option X is unknown,
that would sort of happen automatically. Complaining that "-help" is
unknown and then printing a usage message would be less optimal, but
would get the job done.
Ken