From c7b76764dc10fd2479f51ddf3fb4f1eb20790371 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Mon, 7 Nov 2022 19:37:12 +1300 Subject: [PATCH] auth: Remove early return from make_user_info_dc_pac() 'rg' is never NULL, so this codepath is never taken. But if it were, we would return early and entirely neglect filling in the UPN_DNS_INFO from the 'pac_upn_dns_info' parameter. So remove the early return. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- auth/auth_sam_reply.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/auth/auth_sam_reply.c b/auth/auth_sam_reply.c index 8a68f045547..b088ebb9a43 100644 --- a/auth/auth_sam_reply.c +++ b/auth/auth_sam_reply.c @@ -605,12 +605,7 @@ NTSTATUS make_user_info_dc_pac(TALLOC_CTX *mem_ctx, rg = &pac_logon_info->resource_groups; } - if (rg == NULL) { - *_user_info_dc = user_info_dc; - return NT_STATUS_OK; - } - - if (rg->groups.count > 0) { + if (rg != NULL && rg->groups.count > 0) { /* The IDL layer would be a better place to check this, but to * guard the integer addition below, we double-check */ if (rg->groups.count > 65535) {