mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
s4-auth: Free user_info_dc in KDC caller to authsam_update_user_info_dc()
It is up to the caller to choose if it wants to clean up the user_info_dc memory early, we do so only in the KDC as was allocated on a context provided to samba_kdc_update_pac_blob(), whereas auth_winbind uses a locally managed tevent state as the memory context. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Feb 8 01:05:47 UTC 2023 on atb-devel-224
This commit is contained in:
parent
6f09f06adc
commit
075bd6b9f1
@ -683,7 +683,6 @@ _PUBLIC_ NTSTATUS authsam_update_user_info_dc(TALLOC_CTX *mem_ctx,
|
||||
*/
|
||||
status = authsam_domain_group_filter(mem_ctx, &filter);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
TALLOC_FREE(user_info_dc);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1083,6 +1083,7 @@ NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
|
||||
samdb,
|
||||
user_info_dc);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
TALLOC_FREE(user_info_dc);
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
@ -1091,6 +1092,13 @@ NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
|
||||
_resource_groups,
|
||||
group_inclusion,
|
||||
pac_blob, NULL);
|
||||
|
||||
/*
|
||||
* The infomation from this is now in the PAC, this memory is
|
||||
* not used any longer and not passed to the caller
|
||||
*/
|
||||
TALLOC_FREE(user_info_dc);
|
||||
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user