From: Stefan Metzmacher Date: Sat, 23 Jul 2022 22:44:07 +0000 (+0200) Subject: s3:winbindd: split out wb_gettoken_trylocalgroups() function X-Git-Tag: tdb-1.4.13~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=940effb410ed0a03955902af64acc80df217d2de;p=thirdparty%2Fsamba.git s3:winbindd: split out wb_gettoken_trylocalgroups() function This makes the logical steps a bit cleaner and future changes easier. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/source3/winbindd/wb_gettoken.c b/source3/winbindd/wb_gettoken.c index 3930f71d98d..5e2d21f23be 100644 --- a/source3/winbindd/wb_gettoken.c +++ b/source3/winbindd/wb_gettoken.c @@ -40,6 +40,7 @@ static NTSTATUS wb_add_rids_to_sids(TALLOC_CTX *mem_ctx, static void wb_gettoken_gotuser(struct tevent_req *subreq); static void wb_gettoken_gotgroups(struct tevent_req *subreq); +static void wb_gettoken_trylocalgroups(struct tevent_req *req); static void wb_gettoken_gotlocalgroups(struct tevent_req *subreq); static void wb_gettoken_gotbuiltins(struct tevent_req *subreq); @@ -116,7 +117,6 @@ static void wb_gettoken_gotgroups(struct tevent_req *subreq) req, struct wb_gettoken_state); uint32_t i, num_groups; struct dom_sid *groups; - struct winbindd_domain *domain; NTSTATUS status; struct dom_sid_buf buf; @@ -138,6 +138,16 @@ static void wb_gettoken_gotgroups(struct tevent_req *subreq) } } + wb_gettoken_trylocalgroups(req); +} + +static void wb_gettoken_trylocalgroups(struct tevent_req *req) +{ + struct wb_gettoken_state *state = tevent_req_data( + req, struct wb_gettoken_state); + struct winbindd_domain *domain = NULL; + struct tevent_req *subreq = NULL; + if (!state->expand_local_aliases) { D_DEBUG("Done. Not asked to expand local aliases.\n"); tevent_req_done(req);