1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

s4:kdc: add a returned_kvno helper variable in samba_kdc_trust_message2entry()

This will simplifiy further changes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2024-03-15 19:19:20 +01:00 committed by Andrew Bartlett
parent d1efc396de
commit f48699641c

View File

@ -1861,6 +1861,7 @@ static krb5_error_code samba_kdc_trust_message2entry(krb5_context context,
ENC_ALL_TYPES;
struct lsa_TrustDomainInfoInfoEx *tdo = NULL;
NTSTATUS status;
uint32_t returned_kvno = 0;
*entry = (struct sdb_entry) {};
@ -2093,9 +2094,9 @@ static krb5_error_code samba_kdc_trust_message2entry(krb5_context context,
/* use the kvno the client specified, if available */
if (flags & SDB_F_KVNO_SPECIFIED) {
entry->kvno = kvno;
returned_kvno = kvno;
} else {
entry->kvno = *auth_kvno;
returned_kvno = *auth_kvno;
}
for (i=0; i < auth_array->count; i++) {
@ -2308,6 +2309,8 @@ static krb5_error_code samba_kdc_trust_message2entry(krb5_context context,
samba_kdc_sort_keys(&entry->keys);
entry->kvno = returned_kvno;
ret = sdb_entry_set_etypes(entry);
if (ret) {
goto out;