From: Stefan Metzmacher Date: Sat, 23 Jul 2022 22:46:06 +0000 (+0200) Subject: s3:winbindd: split our wb_gettoken_trybuiltins() helper X-Git-Tag: tdb-1.4.13~147 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74b91490dddfdbaf7f945976de94c0387462fce2;p=thirdparty%2Fsamba.git s3:winbindd: split our wb_gettoken_trybuiltins() helper This makes the logical steps a bit cleaner and future changes easier. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Wed Jan 15 14:00:28 UTC 2025 on atb-devel-224 --- diff --git a/source3/winbindd/wb_gettoken.c b/source3/winbindd/wb_gettoken.c index 5e2d21f23be..4e29691802d 100644 --- a/source3/winbindd/wb_gettoken.c +++ b/source3/winbindd/wb_gettoken.c @@ -42,6 +42,7 @@ 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_trybuiltins(struct tevent_req *req); static void wb_gettoken_gotbuiltins(struct tevent_req *subreq); struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx, @@ -181,7 +182,6 @@ static void wb_gettoken_gotlocalgroups(struct tevent_req *subreq) req, struct wb_gettoken_state); uint32_t num_rids; uint32_t *rids; - struct winbindd_domain *domain; NTSTATUS status; status = wb_lookupuseraliases_recv(subreq, state, &num_rids, &rids); @@ -198,6 +198,16 @@ static void wb_gettoken_gotlocalgroups(struct tevent_req *subreq) } TALLOC_FREE(rids); + wb_gettoken_trybuiltins(req); +} + +static void wb_gettoken_trybuiltins(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; + /* * Now expand the builtin groups */