krb5_timestamp KDB5_EXP_DATE = KRB5_KDB_EXPIRATION;
extern krb5_flags NEW_ATTRIBUTES;
+ if (!req_type) { /* New entry - initialize */
+ memset((char *) entry, 0, sizeof(*entry));
+ entry->principal = (krb5_principal) principal;
+ entry->kvno = KDB5_VERSION_NUM;
+ entry->max_life = KDB5_MAX_TKT_LIFE;
+ entry->max_renewable_life = KDB5_MAX_REN_LIFE;
+ entry->mkvno = mblock.mkvno;
+ entry->expiration = KDB5_EXP_DATE;
+ entry->mod_name = master_princ;
+ } else { /* Modify existing entry */
+ entry->kvno++;
+#ifdef SANDIA
+ entry->attributes &= ~KRB5_KDB_REQUIRES_PWCHANGE;
+#endif
+ entry->mod_name = (krb5_principal) principal;
+ }
+
if (key && key->length) {
retval = krb5_kdb_encrypt_key(&master_encblock,
key,
}
}
- if (!req_type) { /* New entry - initialize */
- memset((char *) entry, 0, sizeof(*entry));
- entry->principal = (krb5_principal) principal;
- entry->kvno = KDB5_VERSION_NUM;
- entry->max_life = KDB5_MAX_TKT_LIFE;
- entry->max_renewable_life = KDB5_MAX_REN_LIFE;
- entry->mkvno = mblock.mkvno;
- entry->expiration = KDB5_EXP_DATE;
- entry->mod_name = master_princ;
- } else { /* Modify existing entry */
- entry->kvno++;
-#ifdef SANDIA
- entry->attributes &= ~KRB5_KDB_REQUIRES_PWCHANGE;
-#endif
- entry->mod_name = (krb5_principal) principal;
- }
-
if (retval = krb5_timeofday(&entry->mod_date)) {
com_err("adm_modify_kdb", retval, "while fetching date");
memset((char *) entry->key.contents, 0, entry->key.length);