From f95495e1f7d31dd32a979514d150ecb755a8c1a1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 20 Dec 2018 10:25:01 -0600 Subject: [PATCH] winbind: honor WBFLAG_FROM_NSS along with winbind enum users/groups Signed-off-by: Stefan Metzmacher Reviewed-by: Bjoern Jacke --- source3/winbindd/winbindd_list_groups.c | 5 +++++ source3/winbindd/winbindd_list_users.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/source3/winbindd/winbindd_list_groups.c b/source3/winbindd/winbindd_list_groups.c index 36800ae54ec..6541de5be0f 100644 --- a/source3/winbindd/winbindd_list_groups.c +++ b/source3/winbindd/winbindd_list_groups.c @@ -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'; diff --git a/source3/winbindd/winbindd_list_users.c b/source3/winbindd/winbindd_list_users.c index fcbe8beff6f..d500463cacc 100644 --- a/source3/winbindd/winbindd_list_users.c +++ b/source3/winbindd/winbindd_list_users.c @@ -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'; -- 2.34.1