summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/wb_next_pwent.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source3/winbindd/wb_next_pwent.c b/source3/winbindd/wb_next_pwent.c
index da4754cc9f..a52a566e7b 100644
--- a/source3/winbindd/wb_next_pwent.c
+++ b/source3/winbindd/wb_next_pwent.c
@@ -148,7 +148,25 @@ static void wb_next_pwent_fill_done(struct tevent_req *subreq)
status = wb_fill_pwent_recv(subreq);
TALLOC_FREE(subreq);
- if (tevent_req_nterror(req, status)) {
+ /*
+ * When you try to enumerate users with 'getent passwd' and the user
+ * doesn't have a uid set we should just move on.
+ */
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) {
+ state->gstate->next_user += 1;
+
+ subreq = wb_fill_pwent_send(state,
+ state->ev,
+ &state->gstate->users[state->gstate->next_user],
+ state->pw);
+ if (tevent_req_nomem(subreq, req)) {
+ tevent_req_post(req, state->ev);
+ return;
+ }
+ tevent_req_set_callback(subreq, wb_next_pwent_fill_done, req);
+
+ return;
+ } else if (tevent_req_nterror(req, status)) {
return;
}
state->gstate->next_user += 1;