The Samba-Bugzilla – Attachment 10907 Details for
Bug 8905
Enumerating groups over NSS doesn't work with idmap_ad
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.1
bug-8905.v4-1.patch (text/plain), 2.64 KB, created by
Michael Adam
on 2015-03-25 12:53:38 UTC
(
hide
)
Description:
Patch for 4.1
Filename:
MIME Type:
Creator:
Michael Adam
Created:
2015-03-25 12:53:38 UTC
Size:
2.64 KB
patch
obsolete
>From 502e6ad13588efcb669696e7f633ad3ea3b81e15 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Mon, 19 Jan 2015 13:51:55 +0100 >Subject: [PATCH] s3:winbind:grent: don't stop group enumeration when a group > has no gid > >simply continue with the next group > >Note: this patch introduces some code duplication to make it >easier to create minimal backport patch. Subsequent patches >will provide some refactoring to reduce the duplication. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=8905 > >Signed-off-by: Michael Adam <obnox@samba.org> >Reviewed-by: Guenther Deschner <gd@samba.org> >(cherry picked from commit 24015224da1f363019d9d2da81ce533463a16abb) >--- > source3/winbindd/wb_next_grent.c | 51 +++++++++++++++++++++++++++++++++++++++- > 1 file changed, 50 insertions(+), 1 deletion(-) > >diff --git a/source3/winbindd/wb_next_grent.c b/source3/winbindd/wb_next_grent.c >index d3b0333..d932384 100644 >--- a/source3/winbindd/wb_next_grent.c >+++ b/source3/winbindd/wb_next_grent.c >@@ -168,9 +168,58 @@ static void wb_next_grent_getgrsid_done(struct tevent_req *subreq) > status = wb_getgrsid_recv(subreq, talloc_tos(), &domname, &name, > &state->gr->gr_gid, &state->members); > TALLOC_FREE(subreq); >- if (tevent_req_nterror(req, status)) { >+ >+ if (NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) { >+ state->gstate->next_group += 1; >+ >+ if (state->gstate->next_group >= state->gstate->num_groups) { >+ TALLOC_FREE(state->gstate->groups); >+ >+ if (state->gstate->domain == NULL) { >+ state->gstate->domain = domain_list(); >+ } else { >+ state->gstate->domain = state->gstate->domain->next; >+ } >+ >+ if ((state->gstate->domain != NULL) && >+ sid_check_is_our_sam(&state->gstate->domain->sid)) >+ { >+ state->gstate->domain = state->gstate->domain->next; >+ } >+ >+ if (state->gstate->domain == NULL) { >+ tevent_req_nterror(req, >+ NT_STATUS_NO_MORE_ENTRIES); >+ return; >+ } >+ >+ subreq = dcerpc_wbint_QueryGroupList_send( >+ state, state->ev, >+ dom_child_handle(state->gstate->domain), >+ &state->next_groups); >+ if (tevent_req_nomem(subreq, req)) { >+ return; >+ } >+ >+ tevent_req_set_callback(subreq, >+ wb_next_grent_fetch_done, req); >+ return; >+ } >+ >+ subreq = wb_getgrsid_send( >+ state, state->ev, >+ &state->gstate->groups[state->gstate->next_group].sid, >+ state->max_nesting); >+ if (tevent_req_nomem(subreq, req)) { >+ return; >+ } >+ tevent_req_set_callback(subreq, wb_next_grent_getgrsid_done, >+ req); >+ return; >+ } else if (tevent_req_nterror(req, status)) { > return; > } >+ > if (!fill_grent(talloc_tos(), state->gr, domname, name, > state->gr->gr_gid)) { > DEBUG(5, ("fill_grent failed\n")); >-- >2.1.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
obnox
:
review+
gd
:
review+
Actions:
View
Attachments on
bug 8905
:
7509
|
10811
|
10812
|
10906
| 10907