Skip to content

Commit

Permalink
Update client and server to reflect removal of keepold argument from
Browse files Browse the repository at this point in the history
create_principal_3.


git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12083 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information
tlyu committed Feb 27, 2000
1 parent b16befe commit a503fee
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
8 changes: 8 additions & 0 deletions src/kadmin/cli/ChangeLog
@@ -1,3 +1,11 @@
2000-02-27 Tom Yu <tlyu@mit.edu>

* kadmin.c (kadmin_parse_princ_args): Remove keepold argument to
match new kadm5 library.
(kadmin_addprinc_usage): Remove keepold argument from usage
summary.
(kadmin_addprinc): Update kadm5 calls to no longer use keepold.

2000-02-25 Ken Raeburn <raeburn@mit.edu>

* kadmin.c (kadmin_modprinc): Complain if -pw option is given,
Expand Down
31 changes: 10 additions & 21 deletions src/kadmin/cli/kadmin.c
Expand Up @@ -668,14 +668,13 @@ void kadmin_cpw(argc, argv)
}

int kadmin_parse_princ_args(argc, argv, oprinc, mask, pass, randkey,
keepold, ks_tuple, n_ks_tuple, caller)
ks_tuple, n_ks_tuple, caller)
int argc;
char *argv[];
kadm5_principal_ent_t oprinc;
long *mask;
char **pass;
int *randkey;
int *keepold;
krb5_key_salt_tuple **ks_tuple;
int *n_ks_tuple;
char *caller;
Expand All @@ -689,7 +688,6 @@ int kadmin_parse_princ_args(argc, argv, oprinc, mask, pass, randkey,
*pass = NULL;
*n_ks_tuple = 0;
*ks_tuple = NULL;
*keepold = 0;
time(&now);
*randkey = 0;
for (i = 1; i < argc - 1; i++) {
Expand Down Expand Up @@ -812,10 +810,6 @@ int kadmin_parse_princ_args(argc, argv, oprinc, mask, pass, randkey,
}
continue;
}
if (!strcmp("-keepold", argv[i])) {
++*keepold;
continue;
}
for (j = 0; j < sizeof (flags) / sizeof (struct pflag); j++) {
if (strlen(argv[i]) == flags[j].flaglen + 1 &&
!strcmp(flags[j].flagname,
Expand Down Expand Up @@ -856,7 +850,7 @@ void kadmin_addprinc_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] [-randkey] [-pw password]\n\t\t[-maxrenewlife maxrenewlife]\n\t\t[-keepold] [-e keysaltlist]\n\t\t[{+|-}attribute]\n");
fprintf(stderr, "\t\t[-expire expdate] [-pwexpire pwexpdate] [-maxlife maxtixlife]\n\t\t[-kvno kvno] [-policy policy] [-randkey] [-pw password]\n\t\t[-maxrenewlife maxrenewlife]\n\t\t[-e keysaltlist]\n\t\t[{+|-}attribute]\n");
fprintf(stderr, "\tattributes are:\n");
fprintf(stderr, "%s%s%s",
"\t\tallow_postdated allow_forwardable allow_tgs_req allow_renewable\n",
Expand Down Expand Up @@ -885,7 +879,7 @@ void kadmin_addprinc(argc, argv)
kadm5_policy_ent_rec defpol;
long mask;
int randkey = 0, i;
int keepold, n_ks_tuple;
int n_ks_tuple;
krb5_key_salt_tuple *ks_tuple;
char *pass, *canon;
krb5_error_code retval;
Expand All @@ -903,7 +897,7 @@ void kadmin_addprinc(argc, argv)
princ.attributes = 0;
if (kadmin_parse_princ_args(argc, argv,
&princ, &mask, &pass, &randkey,
&keepold, &ks_tuple, &n_ks_tuple,
&ks_tuple, &n_ks_tuple,
"add_principal")) {
kadmin_addprinc_usage("add_principal");
return;
Expand Down Expand Up @@ -965,8 +959,8 @@ void kadmin_addprinc(argc, argv)
pass = newpw;
}
mask |= KADM5_PRINCIPAL;
if (keepold || ks_tuple != NULL) {
retval = kadm5_create_principal_3(handle, &princ, mask, keepold,
if (ks_tuple != NULL) {
retval = kadm5_create_principal_3(handle, &princ, mask,
n_ks_tuple, ks_tuple, pass);
} else {
retval = kadm5_create_principal(handle, &princ, mask, pass);
Expand All @@ -981,9 +975,9 @@ void kadmin_addprinc(argc, argv)
return;
}
if (randkey) { /* more special stuff for -randkey */
if (keepold || ks_tuple != NULL) {
if (ks_tuple != NULL) {
retval = kadm5_randkey_principal_3(handle, princ.principal,
keepold,
FALSE,
n_ks_tuple, ks_tuple,
NULL, NULL);
} else {
Expand Down Expand Up @@ -1029,7 +1023,7 @@ void kadmin_modprinc(argc, argv)
krb5_error_code retval;
char *pass, *canon;
int randkey = 0;
int keepold = 0, n_ks_tuple = 0;
int n_ks_tuple = 0;
krb5_key_salt_tuple *ks_tuple;

if (argc < 2) {
Expand Down Expand Up @@ -1066,19 +1060,14 @@ void kadmin_modprinc(argc, argv)
retval = kadmin_parse_princ_args(argc, argv,
&princ, &mask,
&pass, &randkey,
&keepold, &ks_tuple, &n_ks_tuple,
&ks_tuple, &n_ks_tuple,
"modify_principal");
if (ks_tuple != NULL) {
free(ks_tuple);
kadmin_modprinc_usage("modify_principal");
free(canon);
return;
}
if (keepold) {
kadmin_modprinc_usage("modify_principal");
free(canon);
return;
}
if (retval) {
kadmin_modprinc_usage("modify_principal");
free(canon);
Expand Down
4 changes: 4 additions & 0 deletions src/kadmin/server/ChangeLog
@@ -1,3 +1,7 @@
2000-02-27 Tom Yu <tlyu@mit.edu>

* server_stubs.c (create_principal3_1): Remove keepold argument.

2000-02-18 Tom Yu <tlyu@mit.edu>

* kadm_rpc_svc.c (kadm_1): Update to include new api functions.
Expand Down
1 change: 0 additions & 1 deletion src/kadmin/server/server_stubs.c
Expand Up @@ -319,7 +319,6 @@ create_principal3_1(cprinc3_arg *arg, struct svc_req *rqstp)
} else {
ret.code = kadm5_create_principal_3((void *)handle,
&arg->rec, arg->mask,
arg->keepold,
arg->n_ks_tuple,
arg->ks_tuple,
arg->passwd);
Expand Down

0 comments on commit a503fee

Please sign in to comment.