argument number checks are now done by slc

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14026 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2004-07-05 11:41:22 +00:00
parent df516d31e6
commit 5836537f76
9 changed files with 0 additions and 43 deletions

View File

@@ -211,11 +211,6 @@ add_new_key(struct add_options *opt, int argc, char **argv)
krb5_key_data key_data[3];
krb5_key_data *kdp = NULL;
if(argc == 0) {
fprintf(stderr, "usage: add principal...\n");
return 0;
}
num = 0;
if (opt->random_key_flag)
++num;

View File

@@ -48,11 +48,6 @@ del_entry(void *opt, int argc, char **argv)
int i;
krb5_error_code ret;
if(argc == 0) {
fprintf(stderr, "usage: delete principal ...\n");
return 0;
}
for(i = 0; i < argc; i++)
ret = foreach_principal(argv[i], do_del_entry, "del", NULL);
return 0;

View File

@@ -52,11 +52,6 @@ del_enctype(void *opt, int argc, char **argv)
int n_etypes;
krb5_enctype *etypes;
if(argc < 2) {
fprintf(stderr, "usage: del_enctype principal enctypes...\n");
return 0;
}
memset (&princ, 0, sizeof(princ));
princ_name = argv[0];
n_etypes = argc - 1;

View File

@@ -339,11 +339,6 @@ getit(struct get_options *opt, const char *name, int argc, char **argv)
krb5_error_code ret;
struct get_entry_data data;
if(argc == 0) {
fprintf(stderr, "usage: %s principal...\n", name);
return 0;
}
if(opt->long_flag == -1 && (opt->short_flag == 1 || opt->terse_flag == 1))
opt->long_flag = 0;
if(opt->short_flag == -1 && (opt->long_flag == 1 || opt->terse_flag == 1))

View File

@@ -122,10 +122,6 @@ init(struct init_options *opt, int argc, char **argv)
return 0;
}
if(argc == 0) {
fprintf(stderr, "usage: init realm...\n");
return 0;
}
if (opt->realm_max_ticket_life_string) {
if (str2deltat (opt->realm_max_ticket_life_string, &max_life) != 0) {
krb5_warnx (context, "unable to parse \"%s\"",

View File

@@ -494,10 +494,6 @@ loadit(int merge, const char *name, int argc, char **argv)
return 0;
}
if(argc != 1) {
fprintf(stderr, "usage: %s file", name);
return 0;
}
doit(argv[0], merge);
return 0;
}

View File

@@ -87,11 +87,6 @@ mod_entry(struct modify_options *opt, int argc, char **argv)
krb5_error_code ret;
int i;
if (argc < 1) {
fprintf (stderr, "usage: mod [options] principal\n");
return 0;
}
for(i = 0; i < argc; i++)
ret = foreach_principal(argv[i], do_mod_entry, "mod", opt);

View File

@@ -44,11 +44,6 @@ password_quality(void *opt, int argc, char **argv)
krb5_data pw_data;
const char *s;
if(argc != 2) {
fprintf (stderr, "usage: password-quality principal password\n");
return 0;
}
ret = krb5_parse_name(context, argv[0], &principal);
if(ret){
krb5_warn(context, ret, "krb5_parse_name(%s)", argv[0]);

View File

@@ -42,11 +42,6 @@ rename_entry(void *opt, int argc, char **argv)
krb5_error_code ret;
krb5_principal princ1, princ2;
if(argc != 2) {
fprintf(stderr, "usage: rename [options] from to\n");
return 0;
}
ret = krb5_parse_name(context, argv[0], &princ1);
if(ret){
krb5_warn(context, ret, "krb5_parse_name(%s)", argv[0]);