1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

heimdal: Add missing kadm5 error checks

Obtained from:	Heimdal commit 4a0e01f9edabe36d0f2cab188078dd29fa5aaf02
MFC after:	3 days
This commit is contained in:
Cy Schubert 2022-11-26 09:06:09 -08:00
parent 780f663df3
commit 879b0e9cd2
3 changed files with 7 additions and 2 deletions

View File

@ -93,7 +93,8 @@ kadm5_s_get_principals(void *server_handle,
d.exp = expression;
{
krb5_realm r;
krb5_get_default_realm(context->context, &r);
if ((ret = krb5_get_default_realm(context->context, &r)))
return (ret);
asprintf(&d.exp2, "%s@%s", expression, r);
free(r);
}

View File

@ -231,6 +231,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;
}
if(ret){
kadm5_free_principal_ent(context, out);

View File

@ -66,7 +66,9 @@ kadm5_s_rename_principal(void *server_handle,
Salt salt;
krb5_salt salt2;
memset(&salt, 0, sizeof(salt));
krb5_get_pw_salt(context->context, source, &salt2);
ret = krb5_get_pw_salt(context->context, source, &salt2);
if (ret)
goto out;
salt.type = hdb_pw_salt;
salt.salt = salt2.saltvalue;
for(i = 0; i < ent.entry.keys.len; i++){