1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

s4:auth: Introduce helper variable ‘resource_groups_in’

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-09-21 14:15:06 +12:00 committed by Andrew Bartlett
parent 842f845c8a
commit 219ee05d6e

View File

@ -328,6 +328,7 @@ krb5_error_code kerberos_pac_to_user_info_dc(TALLOC_CTX *mem_ctx,
union PAC_INFO _upn_dns_info;
struct PAC_UPN_DNS_INFO *upn_dns_info = NULL;
struct auth_user_info_dc *user_info_dc_out;
struct PAC_DOMAIN_GROUP_MEMBERSHIP *resource_groups_in = NULL;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
@ -477,10 +478,9 @@ krb5_error_code kerberos_pac_to_user_info_dc(TALLOC_CTX *mem_ctx,
* If we have resource groups and the caller wants them returned, we
* oblige.
*/
if (resource_groups != NULL &&
info.logon_info.info->resource_groups.groups.count != 0)
{
*resource_groups = &info.logon_info.info->resource_groups;
resource_groups_in = &info.logon_info.info->resource_groups;
if (resource_groups != NULL && resource_groups_in->groups.count != 0) {
*resource_groups = resource_groups_in;
}
*user_info_dc = user_info_dc_out;