update with new names of functions in util
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6847 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
22
kadmin/get.c
22
kadmin/get.c
@@ -81,13 +81,13 @@ print_entry_short(kadm5_principal_ent_t princ)
|
|||||||
krb5_unparse_name_fixed_short(context, princ->principal, buf, sizeof(buf));
|
krb5_unparse_name_fixed_short(context, princ->principal, buf, sizeof(buf));
|
||||||
printf("%-20s ", buf);
|
printf("%-20s ", buf);
|
||||||
|
|
||||||
timeval2str(princ->princ_expire_time, buf, sizeof(buf), 0);
|
time_t2str(princ->princ_expire_time, buf, sizeof(buf), 0);
|
||||||
printf("%-10s ", buf);
|
printf("%-10s ", buf);
|
||||||
|
|
||||||
timeval2str(princ->pw_expiration, buf, sizeof(buf), 0);
|
time_t2str(princ->pw_expiration, buf, sizeof(buf), 0);
|
||||||
printf("%-10s ", buf);
|
printf("%-10s ", buf);
|
||||||
|
|
||||||
timeval2str(princ->last_pwd_change, buf, sizeof(buf), 0);
|
time_t2str(princ->last_pwd_change, buf, sizeof(buf), 0);
|
||||||
printf("%-10s ", buf);
|
printf("%-10s ", buf);
|
||||||
|
|
||||||
deltat2str(princ->max_life, buf, sizeof(buf));
|
deltat2str(princ->max_life, buf, sizeof(buf));
|
||||||
@@ -97,7 +97,7 @@ print_entry_short(kadm5_principal_ent_t princ)
|
|||||||
printf("%-9s ", buf);
|
printf("%-9s ", buf);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
timeval2str(princ->mod_date, buf, sizeof(buf), 0);
|
time_t2str(princ->mod_date, buf, sizeof(buf), 0);
|
||||||
printf("%-10s ", buf);
|
printf("%-10s ", buf);
|
||||||
|
|
||||||
krb5_unparse_name_fixed(context, princ->mod_name, buf, sizeof(buf));
|
krb5_unparse_name_fixed(context, princ->mod_name, buf, sizeof(buf));
|
||||||
@@ -115,13 +115,13 @@ print_entry_long(kadm5_principal_ent_t princ)
|
|||||||
|
|
||||||
krb5_unparse_name_fixed(context, princ->principal, buf, sizeof(buf));
|
krb5_unparse_name_fixed(context, princ->principal, buf, sizeof(buf));
|
||||||
printf("%24s: %s\n", "Principal", buf);
|
printf("%24s: %s\n", "Principal", buf);
|
||||||
timeval2str(princ->princ_expire_time, buf, sizeof(buf), 1);
|
time_t2str(princ->princ_expire_time, buf, sizeof(buf), 1);
|
||||||
printf("%24s: %s\n", "Principal expires", buf);
|
printf("%24s: %s\n", "Principal expires", buf);
|
||||||
|
|
||||||
timeval2str(princ->pw_expiration, buf, sizeof(buf), 1);
|
time_t2str(princ->pw_expiration, buf, sizeof(buf), 1);
|
||||||
printf("%24s: %s\n", "Password expires", buf);
|
printf("%24s: %s\n", "Password expires", buf);
|
||||||
|
|
||||||
timeval2str(princ->last_pwd_change, buf, sizeof(buf), 1);
|
time_t2str(princ->last_pwd_change, buf, sizeof(buf), 1);
|
||||||
printf("%24s: %s\n", "Last password change", buf);
|
printf("%24s: %s\n", "Last password change", buf);
|
||||||
|
|
||||||
deltat2str(princ->max_life, buf, sizeof(buf));
|
deltat2str(princ->max_life, buf, sizeof(buf));
|
||||||
@@ -132,16 +132,16 @@ print_entry_long(kadm5_principal_ent_t princ)
|
|||||||
printf("%24s: %d\n", "Kvno", princ->kvno);
|
printf("%24s: %d\n", "Kvno", princ->kvno);
|
||||||
printf("%24s: %d\n", "Mkvno", princ->mkvno);
|
printf("%24s: %d\n", "Mkvno", princ->mkvno);
|
||||||
printf("%24s: %s\n", "Policy", princ->policy ? princ->policy : "none");
|
printf("%24s: %s\n", "Policy", princ->policy ? princ->policy : "none");
|
||||||
timeval2str(princ->last_success, buf, sizeof(buf), 1);
|
time_t2str(princ->last_success, buf, sizeof(buf), 1);
|
||||||
printf("%24s: %s\n", "Last successful login", buf);
|
printf("%24s: %s\n", "Last successful login", buf);
|
||||||
timeval2str(princ->last_failed, buf, sizeof(buf), 1);
|
time_t2str(princ->last_failed, buf, sizeof(buf), 1);
|
||||||
printf("%24s: %s\n", "Last failed login", buf);
|
printf("%24s: %s\n", "Last failed login", buf);
|
||||||
printf("%24s: %d\n", "Failed login count", princ->fail_auth_count);
|
printf("%24s: %d\n", "Failed login count", princ->fail_auth_count);
|
||||||
timeval2str(princ->mod_date, buf, sizeof(buf), 1);
|
time_t2str(princ->mod_date, buf, sizeof(buf), 1);
|
||||||
printf("%24s: %s\n", "Last modified", buf);
|
printf("%24s: %s\n", "Last modified", buf);
|
||||||
krb5_unparse_name_fixed(context, princ->mod_name, buf, sizeof(buf));
|
krb5_unparse_name_fixed(context, princ->mod_name, buf, sizeof(buf));
|
||||||
printf("%24s: %s\n", "Modifier", buf);
|
printf("%24s: %s\n", "Modifier", buf);
|
||||||
attr2str (princ->attributes, buf, sizeof(buf));
|
attributes2str (princ->attributes, buf, sizeof(buf));
|
||||||
printf("%24s: %s\n", "Attributes", buf);
|
printf("%24s: %s\n", "Attributes", buf);
|
||||||
|
|
||||||
printf("%24s: ", "Keytypes(salts)");
|
printf("%24s: ", "Keytypes(salts)");
|
||||||
|
@@ -150,14 +150,15 @@ init(int argc, char **argv)
|
|||||||
|
|
||||||
/* Create `krbtgt/REALM' */
|
/* Create `krbtgt/REALM' */
|
||||||
krb5_make_principal(context, &princ, argv[i], "krbtgt", argv[i], NULL);
|
krb5_make_principal(context, &princ, argv[i], "krbtgt", argv[i], NULL);
|
||||||
if (realm_max_life == NULL)
|
if (realm_max_life == NULL) {
|
||||||
get_deltat("Realm max ticket life",
|
max_life = 0;
|
||||||
"unlimited",
|
edit_deltat ("Realm max ticket life", &max_life, NULL, 0);
|
||||||
&max_life);
|
}
|
||||||
if (realm_max_rlife == NULL)
|
if (realm_max_rlife == NULL) {
|
||||||
get_deltat("Realm max renewable ticket life",
|
max_rlife = 0;
|
||||||
"unlimited",
|
edit_deltat("Realm max renewable ticket life", &max_rlife,
|
||||||
&max_rlife);
|
NULL, 0);
|
||||||
|
}
|
||||||
create_random_entry(princ, max_life, max_rlife, 0);
|
create_random_entry(princ, max_life, max_rlife, 0);
|
||||||
krb5_free_principal(context, princ);
|
krb5_free_principal(context, princ);
|
||||||
/* Create `kadmin/changepw' */
|
/* Create `kadmin/changepw' */
|
||||||
|
Reference in New Issue
Block a user