The Samba-Bugzilla – Attachment 11404 Details for
Bug 11488
AD samr GetGroupsForUser fails for users with "()" in their name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
11488.patch (text/plain), 1.77 KB, created by
Volker Lendecke
on 2015-09-03 06:17:33 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2015-09-03 06:17:33 UTC
Size:
1.77 KB
patch
obsolete
>From 0dc5712b319c2b2e48976008a9083f1c3c02ac7f Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Tue, 1 Sep 2015 08:41:04 +0200 >Subject: [PATCH] samr4: Use <SID=%s> in GetGroupsForUser > >This way we avoid quoting problems in user's DNs > >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >Bug: https://bugzilla.samba.org/show_bug.cgi?id=11488 > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Tue Sep 1 23:49:14 CEST 2015 on sn-devel-104 >--- > source4/rpc_server/samr/dcesrv_samr.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c >index d0c748e..9f3bd10 100644 >--- a/source4/rpc_server/samr/dcesrv_samr.c >+++ b/source4/rpc_server/samr/dcesrv_samr.c >@@ -3575,17 +3575,23 @@ static NTSTATUS dcesrv_samr_GetGroupsForUser(struct dcesrv_call_state *dce_call, > const char * const attrs[2] = { "objectSid", NULL }; > struct samr_RidWithAttributeArray *array; > int i, count; >+ char membersidstr[DOM_SID_STR_BUFLEN]; > > DCESRV_PULL_HANDLE(h, r->in.user_handle, SAMR_HANDLE_USER); > > a_state = h->data; > d_state = a_state->domain_state; > >+ dom_sid_string_buf(a_state->account_sid, >+ membersidstr, sizeof(membersidstr)), >+ > count = samdb_search_domain(a_state->sam_ctx, mem_ctx, > d_state->domain_dn, &res, > attrs, d_state->domain_sid, >- "(&(member=%s)(|(grouptype=%d)(grouptype=%d))(objectclass=group))", >- ldb_dn_get_linearized(a_state->account_dn), >+ "(&(member=<SID=%s>)" >+ "(|(grouptype=%d)(grouptype=%d))" >+ "(objectclass=group))", >+ membersidstr, > GTYPE_SECURITY_UNIVERSAL_GROUP, > GTYPE_SECURITY_GLOBAL_GROUP); > if (count < 0) >-- >1.9.1 >
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:
metze
:
review+
Actions:
View
Attachments on
bug 11488
: 11404