38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 723a30b45ba4cbd9a4913fd37d68e392dcfc16ba Mon Sep 17 00:00:00 2001
|
|
From: Sumit Bose <sbose@redhat.com>
|
|
Date: Fri, 7 Jun 2024 18:04:00 +0200
|
|
Subject: [PATCH] ad: use right memory context in GPO code
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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: https://github.com/SSSD/sssd/issues/7411
|
|
|
|
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
|
|
Reviewed-by: Tomáš Halman <thalman@redhat.com>
|
|
(cherry picked from commit b25e510ad60f6ce0b57063cce648c3aa48b21241)
|
|
---
|
|
src/providers/ad/ad_gpo.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
|
|
index b879b0a08..ed664ec83 100644
|
|
--- a/src/providers/ad/ad_gpo.c
|
|
+++ b/src/providers/ad/ad_gpo.c
|
|
@@ -711,7 +711,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;
|
|
|
|
--
|
|
2.44.0
|
|
|