]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbindd: split our wb_gettoken_trybuiltins() helper
authorStefan Metzmacher <metze@samba.org>
Sat, 23 Jul 2022 22:46:06 +0000 (00:46 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 15 Jan 2025 14:00:28 +0000 (14:00 +0000)
This makes the logical steps a bit cleaner and future changes easier.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jan 15 14:00:28 UTC 2025 on atb-devel-224

source3/winbindd/wb_gettoken.c

index 5e2d21f23be069da78bc36d17b73564a85be3990..4e29691802de37fa6f8feb7338e5064e460b6a51 100644 (file)
@@ -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
         */