Skip to content

Commit

Permalink
ad: use right memory context in GPO code
Browse files Browse the repository at this point in the history
The original primary SID is allocated on a temporary context and must be
move to be longer living one to still be available when the SID is
evaluated later in the code.

Resolves: #7411

Reviewed-by: Alexey Tikhonov <[email protected]>
Reviewed-by: Tomáš Halman <[email protected]>
  • Loading branch information
sumit-bose authored and alexey-tikhonov committed Jun 14, 2024
1 parent f9c0c6d commit b25e510
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/ad/ad_gpo.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ ad_gpo_get_sids(TALLOC_CTX *mem_ctx,
}
group_sids[i++] = talloc_strdup(group_sids, AD_AUTHENTICATED_USERS_SID);
if (orig_gid_sid != NULL) {
group_sids[i++] = orig_gid_sid;
group_sids[i++] = talloc_steal(group_sids, orig_gid_sid);
}
group_sids[i] = NULL;

Expand Down

0 comments on commit b25e510

Please sign in to comment.