Print an error message if there are no arguments to "auth" or
"encrypt", instead of core dumping.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4638
dc483132-0cff-0310-8789-
dd5450dbe970
+Mon Nov 7 22:40:17 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * commands.c (auth_cmd, encrypt_cmd): Print an error message if
+ there are no arguments to "auth" or "encrypt", instead of
+ core dumping.
+
+ * commands.c (auth_enable, auth_disable): Change prototypes of
+ these routines to be a char *.
+
Mon Oct 3 13:28:04 1994 Theodore Y. Ts'o (tytso@dcl)
* externs.h: The proper place to look for termios.h is
};
extern int
- auth_enable P((int)),
- auth_disable P((int)),
+ auth_enable P((char *)),
+ auth_disable P((char *)),
auth_status P((void));
static int
auth_help P((void));
{
struct authlist *c;
+ if (argc < 2) {
+ fprintf(stderr,
+ "Need an argument to 'auth' command. 'auth ?' for help.\n");
+ return 0;
+ }
+
c = (struct authlist *)
genget(argv[1], (char **) AuthList, sizeof(struct authlist));
if (c == 0) {
{
struct encryptlist *c;
+ if (argc < 2) {
+ fprintf(stderr,
+ "Need an argument to 'encrypt' command. 'encrypt ?' for help.\n");
+ return 0;
+ }
+
c = (struct encryptlist *)
genget(argv[1], (char **) EncryptList, sizeof(struct encryptlist));
if (c == 0) {