winbind: honor WBFLAG_FROM_NSS along with winbind enum users/groups
authorStefan Metzmacher <metze@samba.org>
Thu, 20 Dec 2018 16:25:01 +0000 (10:25 -0600)
committerBjoern Jacke <bj@sernet.de>
Sat, 22 Dec 2018 02:11:14 +0000 (03:11 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Bjoern Jacke <bj@sernet.de>
source3/winbindd/winbindd_list_groups.c
source3/winbindd/winbindd_list_users.c

index 36800ae..6541de5 100644 (file)
@@ -52,6 +52,11 @@ struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
+       if (request->wb_flags & WBFLAG_FROM_NSS && !lp_winbind_enum_groups()) {
+               tevent_req_done(req);
+               return tevent_req_post(req, ev);
+       }
+
        /* Ensure null termination */
        request->domain_name[sizeof(request->domain_name)-1]='\0';
 
index fcbe8be..d500463 100644 (file)
@@ -53,6 +53,11 @@ struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
+       if (request->wb_flags & WBFLAG_FROM_NSS && !lp_winbind_enum_users()) {
+               tevent_req_done(req);
+               return tevent_req_post(req, ev);
+       }
+
        /* Ensure null termination */
        request->domain_name[sizeof(request->domain_name)-1]='\0';