From: Barry Jaspan Date: Fri, 16 Aug 1996 17:53:12 +0000 (+0000) Subject: * kadmin.c: update addprinc and modprinc usage X-Git-Tag: krb5-1.0-beta7~134 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=101210be8dc2de1d990817ea645eb622727bf429;p=krb5.git * kadmin.c: update addprinc and modprinc usage git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8948 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/cli/ChangeLog b/src/kadmin/cli/ChangeLog index 3c6d5eb69..3c1547e6a 100644 --- a/src/kadmin/cli/ChangeLog +++ b/src/kadmin/cli/ChangeLog @@ -1,3 +1,7 @@ +Fri Aug 16 13:46:31 1996 Barry Jaspan + + * kadmin.c: update addprinc and modprinc usage + Thu Aug 15 20:56:13 1996 Tom Yu * configure.in: remove check for -ldbm and -lndbm (old old diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index f326b0287..0fcbfeb73 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -783,7 +783,6 @@ int kadmin_parse_princ_args(argc, argv, oprinc, mask, pass, randkey, caller) return -1; /* nothing was parsed */ } if (i != argc - 1) { - fprintf(stderr, "%s: parser lost count!\n", caller); return -1; } retval = kadmin_parse_name(argv[i], &oprinc->principal); @@ -794,14 +793,30 @@ int kadmin_parse_princ_args(argc, argv, oprinc, mask, pass, randkey, caller) return 0; } -void kadmin_addmodprinc_usage(func) +void kadmin_addprinc_usage(func) + char *func; +{ + fprintf(stderr, "usage: %s [options] principal\n", func); + fprintf(stderr, "\toptions are:\n"); + fprintf(stderr, "\t\t[-expire expdate] [-pwexpire pwexpdate] [-maxlife maxtixlife]\n\t\t[-kvno kvno] [-policy policy] [-randpass] [-pw password]\n\t\t[-maxrenewlife maxrenewlife] [{+|-}attribute]\n"); + fprintf(stderr, "\tattributes are:\n"); + fprintf(stderr, "%s%s%s", + "\t\tallow_postdated allow_forwardable allow_tgs_req allow_renewable\n", + "\t\tallow_proxiable allow_dup_skey allow_tix requires_preauth\n", + "\t\trequires_hwauth needchange allow_svr password_changing_service\n"); +} + +void kadmin_modprinc_usage(func) char *func; { fprintf(stderr, "usage: %s [options] principal\n", func); fprintf(stderr, "\toptions are:\n"); - fprintf(stderr, "\t\t[-expire expdate] [-pwexpire pwexpdate] [-maxlife maxtixlife]\n\t\t[-kvno kvno] [-policy policy] [-randpass] [-pw password]\n\t\t-maxrenewlife maxrenewlife] [{+|-}attribute]\n"); + fprintf(stderr, "\t\t[-expire expdate] [-pwexpire pwexpdate] [-maxlife maxtixlife]\n\t\t[-kvno kvno] [-policy policy] [-clearpolicy]\n\t\t[-maxrenewlife maxrenewlife] [{+|-}attribute]\n"); fprintf(stderr, "\tattributes are:\n"); - fprintf(stderr, "\t\tallow_tgs_req, allow_tix, needchange, password_changing_service\n"); + fprintf(stderr, "%s%s%s", + "\t\tallow_postdated allow_forwardable allow_tgs_req allow_renewable\n", + "\t\tallow_proxiable allow_dup_skey allow_tix requires_preauth\n", + "\t\trequires_hwauth needchange allow_svr password_changing_service\n"); } void kadmin_addprinc(argc, argv) @@ -823,7 +838,7 @@ void kadmin_addprinc(argc, argv) if (kadmin_parse_princ_args(argc, argv, &princ, &mask, &pass, &randkey, "add_principal")) { - kadmin_addmodprinc_usage("add_principal"); + kadmin_addprinc_usage("add_principal"); return; } retval = krb5_unparse_name(context, princ.principal, &canon); @@ -903,7 +918,7 @@ void kadmin_modprinc(argc, argv) int randkey = 0; if (argc < 2) { - kadmin_addmodprinc_usage("modify_principal"); + kadmin_modprinc_usage("modify_principal"); return; } @@ -938,7 +953,7 @@ void kadmin_modprinc(argc, argv) &pass, &randkey, "modify_principal"); if (retval) { - kadmin_addmodprinc_usage("modify_principal"); + kadmin_modprinc_usage("modify_principal"); free(canon); return; }