The Samba-Bugzilla – Attachment 10706 Details for
Bug 7167
winbind enum groups = yes does not work for local groups
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for master
patch (text/plain), 3.20 KB, created by
Guenther Deschner
on 2015-02-05 08:24:54 UTC
(
hide
)
Description:
patch for master
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2015-02-05 08:24:54 UTC
Size:
3.20 KB
patch
obsolete
>From 30f5e70f40bc73fa964ea5456bea154d72bfbbe4 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org> >Date: Wed, 4 Feb 2015 15:40:30 +0100 >Subject: [PATCH] s3-winbindd: make sure to enumerate local groups as well. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=7167 > >Guenther > >Signed-off-by: Günther Deschner <gd@samba.org> >--- > source3/winbindd/winbindd_dual_srv.c | 47 ++++++++++++++++++++++++++++-------- > 1 file changed, 37 insertions(+), 10 deletions(-) > >diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c >index 061de72..5650b95 100644 >--- a/source3/winbindd/winbindd_dual_srv.c >+++ b/source3/winbindd/winbindd_dual_srv.c >@@ -380,8 +380,8 @@ NTSTATUS _wbint_QueryGroupList(struct pipes_struct *p, > struct wbint_QueryGroupList *r) > { > struct winbindd_domain *domain = wb_child_domain(); >- uint32_t i, num_groups; >- struct wb_acct_info *groups; >+ uint32_t i, num_dom_groups, num_local_groups; >+ struct wb_acct_info *dom_groups, *local_groups; > struct wbint_Principal *result; > NTSTATUS status; > >@@ -390,33 +390,60 @@ NTSTATUS _wbint_QueryGroupList(struct pipes_struct *p, > } > > status = domain->methods->enum_dom_groups(domain, talloc_tos(), >- &num_groups, &groups); >+ &num_dom_groups, >+ &dom_groups); > reset_cm_connection_on_error(domain, status); > if (!NT_STATUS_IS_OK(status)) { > return status; > } > >+ status = domain->methods->enum_local_groups(domain, talloc_tos(), >+ &num_local_groups, >+ &local_groups); >+ reset_cm_connection_on_error(domain, status); >+ if (!NT_STATUS_IS_OK(status)) { >+ TALLOC_FREE(dom_groups); >+ return status; >+ } >+ > result = talloc_array(r->out.groups, struct wbint_Principal, >- num_groups); >+ num_dom_groups + num_local_groups); > if (result == NULL) { >+ TALLOC_FREE(dom_groups); >+ TALLOC_FREE(local_groups); > return NT_STATUS_NO_MEMORY; > } > >- for (i=0; i<num_groups; i++) { >- sid_compose(&result[i].sid, &domain->sid, groups[i].rid); >+ for (i=0; i<num_dom_groups; i++) { >+ sid_compose(&result[i].sid, &domain->sid, dom_groups[i].rid); > result[i].type = SID_NAME_DOM_GRP; >- result[i].name = talloc_strdup(result, groups[i].acct_name); >+ result[i].name = talloc_strdup(result, dom_groups[i].acct_name); > if (result[i].name == NULL) { > TALLOC_FREE(result); >- TALLOC_FREE(groups); >+ TALLOC_FREE(dom_groups); >+ TALLOC_FREE(local_groups); > return NT_STATUS_NO_MEMORY; > } > } > >- r->out.groups->num_principals = num_groups; >+ for (i=0; i<num_local_groups; i++) { >+ sid_compose(&result[i+num_dom_groups].sid, &domain->sid, local_groups[i].rid); >+ result[i+num_dom_groups].type = SID_NAME_ALIAS; >+ result[i+num_dom_groups].name = talloc_strdup(result, local_groups[i].acct_name); >+ if (result[i+num_dom_groups].name == NULL) { >+ TALLOC_FREE(result); >+ TALLOC_FREE(dom_groups); >+ TALLOC_FREE(local_groups); >+ return NT_STATUS_NO_MEMORY; >+ } >+ } >+ >+ r->out.groups->num_principals = num_dom_groups + num_local_groups; > r->out.groups->principals = result; > >- TALLOC_FREE(groups); >+ TALLOC_FREE(dom_groups); >+ TALLOC_FREE(local_groups); >+ > return NT_STATUS_OK; > } > >-- >1.9.3 >
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:
gd
:
review?
(
bjacke
)
gd
:
review?
(
obnox
)
Actions:
View
Attachments on
bug 7167
: 10706