1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s4:kdc: Return an error code if sdb_entry_to_hdb_entry() fails

This condition was written backwards — if samba_kdc_fetch() returned
zero, we would ignore any error code returned by
sdb_entry_to_hdb_entry().

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-08-10 16:13:12 +12:00 committed by Andrew Bartlett
parent 93c0f35521
commit 84929c6855

View File

@ -178,7 +178,7 @@ static krb5_error_code hdb_samba4_fetch_kvno(krb5_context context, HDB *db,
ret = sdb_entry_to_hdb_entry(context, &sentry, entry);
sdb_entry_free(&sentry);
if (code != 0 && ret != 0) {
if (code == 0) {
code = ret;
}