TODO asn-nwrap
authorAndreas Schneider <asn@samba.org>
Tue, 28 Feb 2023 11:44:35 +0000 (12:44 +0100)
committerAndreas Schneider <asn@samba.org>
Tue, 28 Feb 2023 11:44:35 +0000 (12:44 +0100)
source3/winbindd/wb_getgrsid.c
source3/winbindd/winbindd_samr.c

index c62d5040dc995ca18e9aca361f3dd40d7d40acc5..20476c17da2f7e2acb1c2fac12f8b9357492740e 100644 (file)
@@ -177,12 +177,19 @@ static void wb_getgrsid_sid2gid_done(struct tevent_req *subreq)
         * the "regular" case of a group type sid.
         */
 
-       subreq = wb_group_members_send(state, state->ev, &state->sid,
-                                      state->type, state->max_nesting);
-       if (tevent_req_nomem(subreq, req)) {
-               return;
+
+       if (state->type == SID_NAME_DOM_GRP /* || .. */) {
+               subreq = wb_group_members_send(state, state->ev, &state->sid,
+                                       state->type, state->max_nesting);
+               if (tevent_req_nomem(subreq, req)) {
+                       return;
+               }
+               tevent_req_set_callback(subreq, wb_getgrsid_got_members, req);
+       } else if (state->type == SID_NAME_ALIAS) {
+               /* wb_alias_members_send() */
+               /* if max_nesting > 0, call e.g. wb_group_members_send() on
+               * result? */
        }
-       tevent_req_set_callback(subreq, wb_getgrsid_got_members, req);
 }
 
 static void wb_getgrsid_got_members(struct tevent_req *subreq)
index ebf9c24b9e4d7315b9c1a05c4d0b30f9426bc9d4..eff5e819d18b7cba46dca9d97994bf7bacb1324c 100644 (file)
@@ -1327,6 +1327,7 @@ struct winbindd_methods sam_passdb_methods = {
        .lookup_usergroups     = sam_lookup_usergroups,
        .lookup_useraliases    = sam_lookup_useraliases,
        .lookup_groupmem       = sam_lookup_groupmem,
+       .lookup_aliasmem       = sam_lookup_aliasmem,
        .lockout_policy        = sam_lockout_policy,
        .password_policy       = sam_password_policy,
        .trusted_domains       = sam_trusted_domains