Add missing initialization of mandatory

This commit is contained in:
Nicolas Williams
2015-05-27 17:05:29 -05:00
parent b1af99aa81
commit 76965a2a14
6 changed files with 14 additions and 0 deletions

View File

@@ -453,6 +453,7 @@ hdb_entry_set_kvno_diff_clnt(krb5_context context, hdb_entry *entry,
if (diff > 16384)
return EINVAL;
ext.mandatory = FALSE;
ext.data.element = choice_HDB_extension_data_hist_kvno_diff_clnt;
ext.data.u.hist_kvno_diff_clnt = diff;
return hdb_replace_extension(context, entry, &ext);
@@ -485,6 +486,7 @@ hdb_entry_set_kvno_diff_svc(krb5_context context, hdb_entry *entry,
if (diff > 16384)
return EINVAL;
ext.mandatory = FALSE;
ext.data.element = choice_HDB_extension_data_hist_kvno_diff_svc;
ext.data.u.hist_kvno_diff_svc = diff;
return hdb_replace_extension(context, entry, &ext);

View File

@@ -227,6 +227,8 @@ hdb_add_current_keys_to_history(krb5_context context, hdb_entry *entry)
ext->data.element = choice_HDB_extension_data_hist_keys;
}
ext->mandatory = FALSE;
/*
* Copy in newest old keyset
*/
@@ -285,6 +287,7 @@ hdb_add_history_key(krb5_context context, hdb_entry *entry, krb5_kvno kvno, Key
extp = &ext;
}
extp->mandatory = FALSE;
hist_keys = &extp->data.u.hist_keys;
for (i = 0; i < hist_keys->len; i++) {