From: Ezra Peisach Date: Tue, 13 Aug 1996 02:52:23 +0000 (+0000) Subject: * kadmin.1: Remove rename_principal. Add -maxrenewlife X-Git-Tag: krb5-1.0-beta7~149 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d5f64d41e62b86ae8bdbadf504aa8662e4d39c37;p=krb5.git * kadmin.1: Remove rename_principal. Add -maxrenewlife * kadmin.c (kadmin_getprinc): Display the maximum renewable life field. (kadmin_parse_princ_args): Add -maxrenwlife as a settable field. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8933 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/cli/ChangeLog b/src/kadmin/cli/ChangeLog index ace4bac7a..0a0f18965 100644 --- a/src/kadmin/cli/ChangeLog +++ b/src/kadmin/cli/ChangeLog @@ -1,3 +1,12 @@ +Mon Aug 12 20:20:11 1996 Ezra Peisach + + * kadmin.1: Remove rename_principal. Add -maxrenewlife. + + * kadmin.c (kadmin_getprinc): Display the maximum renewable life + field. + (kadmin_parse_princ_args): Add -maxrenwlife as a settable + field. + Mon Aug 12 11:47:31 1996 Barry Jaspan * kadmin_ct.ct: fix typo in add_principal diff --git a/src/kadmin/cli/kadmin.1 b/src/kadmin/cli/kadmin.1 index a8db58334..dbd4d77ff 100644 --- a/src/kadmin/cli/kadmin.1 +++ b/src/kadmin/cli/kadmin.1 @@ -127,6 +127,9 @@ add_principal [options] _newprinc_ -maxlife _maxlife_ maximum ticket life of the principal + -maxrenewlife _maxrenewlife_ + maximum renewable ticket lifetime of the principal + -kvno _kvno_ explicity set the key version number. This is not recommended. @@ -227,29 +230,6 @@ modify_principal [options] _principal_ KADM5_UNK_POLICY (policy does not exist) KADM5_BAD_MASK (shouldn't happen) -rename_principal [-force] _old_ _new_ - rename the principal _old_ to _new_. Prompts for - confirmation, unless the "-force" option is given. Requires - both the "add" and "delete" privileges. Aliased to - "renprinc". - - EXAMPLE - kadmin: renprinc tlyutest test0 - Are you sure you want to rename the principal - "tlyutest@ATHENA.MIT.EDU" to - "test0@ATHENA.MIT.EDU"? (yes/no): yes - Principal "tlyutest@ATHENA.MIT.EDU" renamed to - "test0@ATHENA.MIT.EDU". - Make sure that you have removed "tlyutest@ATHENA.MIT.EDU" from - all ACLs before reusing. - kadmin: - - ERRORS - KADM5_AUTH_ADD (requires "add" privilege) - KADM5_AUTH_DELETE (requires "delete" privilege) - KADM5_UNK_PRINC (source principal does not exist) - KADM5_DUP (target principal already exists) - change_password [options] _principal_ changes the password of _principal_. Prompts for a new password if neither -randpass or -pw is specified. Requires diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index 5fdb6bddc..f326b0287 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -708,6 +708,16 @@ int kadmin_parse_princ_args(argc, argv, oprinc, mask, pass, randkey, caller) continue; } } + if (strlen(argv[i]) == 13 && + !strcmp("-maxrenewlife", argv[i])) { + if (++i > argc - 2) + return -1; + else { + oprinc->max_renewable_life = get_date(argv[i], NULL) - now; + *mask |= KADM5_MAX_RLIFE; + continue; + } + } if (strlen(argv[i]) == 5 && !strcmp("-kvno", argv[i])) { if (++i > argc - 2) @@ -789,7 +799,7 @@ void kadmin_addmodprinc_usage(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[{+|-}attribute]\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, "\t\tallow_tgs_req, allow_tix, needchange, password_changing_service\n"); } @@ -1005,6 +1015,7 @@ void kadmin_getprinc(argc, argv) dprinc.pw_expiration ? strdate(dprinc.pw_expiration) : "[none]"); printf("Maximum ticket life: %s\n", strdur(dprinc.max_life)); + printf("Maximum renewable life: %s\n", strdur(dprinc.max_renewable_life)); printf("Last modified: by %s\n\ton %s\n", modcanon, strdate(dprinc.mod_date)); printf("Last successful authentication: %s\n",