From 17b38758ffae3535a2f27fd8445b083893896fde Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Sat, 23 Apr 2011 18:25:40 -0700 Subject: [PATCH] patch from Christos Zoulas --- kadmin/util.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kadmin/util.c b/kadmin/util.c index 57b1cb8de..feaa58159 100644 --- a/kadmin/util.c +++ b/kadmin/util.c @@ -65,7 +65,7 @@ struct units kdb_attrs[] = { { "disallow-tgt-based", KRB5_KDB_DISALLOW_TGT_BASED }, { "disallow-forwardable", KRB5_KDB_DISALLOW_FORWARDABLE }, { "disallow-postdated", KRB5_KDB_DISALLOW_POSTDATED }, - { NULL } + { NULL, 0 } }; /* @@ -188,7 +188,7 @@ str2time_t (const char *str, time_t *t) if (str[0] == '+') { str++; *t = parse_time(str, "month"); - if (t < 0) + if (*t < 0) return -1; *t += time(NULL); return 0; @@ -430,7 +430,7 @@ edit_entry(kadm5_principal_ent_t ent, int *mask, */ int -set_entry(krb5_context context, +set_entry(krb5_context contextp, kadm5_principal_ent_t ent, int *mask, const char *max_ticket_life, @@ -442,14 +442,14 @@ set_entry(krb5_context context, if (max_ticket_life != NULL) { if (parse_deltat (max_ticket_life, &ent->max_life, mask, KADM5_MAX_LIFE)) { - krb5_warnx (context, "unable to parse `%s'", max_ticket_life); + krb5_warnx (contextp, "unable to parse `%s'", max_ticket_life); return 1; } } if (max_renewable_life != NULL) { if (parse_deltat (max_renewable_life, &ent->max_renewable_life, mask, KADM5_MAX_RLIFE)) { - krb5_warnx (context, "unable to parse `%s'", max_renewable_life); + krb5_warnx (contextp, "unable to parse `%s'", max_renewable_life); return 1; } } @@ -457,21 +457,21 @@ set_entry(krb5_context context, if (expiration) { if (parse_timet (expiration, &ent->princ_expire_time, mask, KADM5_PRINC_EXPIRE_TIME)) { - krb5_warnx (context, "unable to parse `%s'", expiration); + krb5_warnx (contextp, "unable to parse `%s'", expiration); return 1; } } if (pw_expiration) { if (parse_timet (pw_expiration, &ent->pw_expiration, mask, KADM5_PW_EXPIRATION)) { - krb5_warnx (context, "unable to parse `%s'", pw_expiration); + krb5_warnx (contextp, "unable to parse `%s'", pw_expiration); return 1; } } if (attributes != NULL) { if (parse_attributes (attributes, &ent->attributes, mask, KADM5_ATTRIBUTES)) { - krb5_warnx (context, "unable to parse `%s'", attributes); + krb5_warnx (contextp, "unable to parse `%s'", attributes); return 1; } } -- 2.11.4.GIT