kadm5: Add missing error checks

This commit is contained in:
Nicolas Williams
2022-01-19 16:57:06 -06:00
parent 97cef99f54
commit 4a0e01f9ed
3 changed files with 9 additions and 4 deletions

View File

@@ -296,8 +296,7 @@ kadm5_s_get_principal(void *server_handle,
krb5_free_salt(context->context, salt);
assert( out->n_key_data == n_keys );
}
if (ret)
goto out;
assert(ret == 0);
if(mask & KADM5_TL_DATA) {
time_t last_pw_expire;
const HDB_Ext_PKINIT_acl *acl;
@@ -324,6 +323,8 @@ kadm5_s_get_principal(void *server_handle,
unsigned char buf[4];
_krb5_put_int(buf, last_pw_expire, sizeof(buf));
ret = add_tl_data(out, KRB5_TL_LAST_PWD_CHANGE, buf, sizeof(buf));
if (ret)
goto out;
}
ret = hdb_entry_get_krb5_config(&ent, &krb5_config);