The Samba-Bugzilla – Attachment 8634 Details for
Bug 9711
Windbind does not prefix groups with domain (in nsswitch calls)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patchset for 4.0 cherry-picked from master
patchset.bug9711 (text/plain), 3.93 KB, created by
Michael Adam
on 2013-03-12 12:08:54 UTC
(
hide
)
Description:
patchset for 4.0 cherry-picked from master
Filename:
MIME Type:
Creator:
Michael Adam
Created:
2013-03-12 12:08:54 UTC
Size:
3.93 KB
patch
obsolete
>From ba2d641c25eb25e10c763a1aea2abda4092e4695 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Wed, 27 Feb 2013 00:45:55 +0100 >Subject: [PATCH 1/2] s4:winbindd: do not drop the workgroup name in the > getgrnam and getgrent calls. > >First part of fix for bug #9711. > >Signed-off-by: Michael Adam <obnox@samba.org> > >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit ecd0b10d2f1de986303f8aab2915c20c2f025244) >--- > source4/winbind/wb_cmd_getgrnam.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/source4/winbind/wb_cmd_getgrnam.c b/source4/winbind/wb_cmd_getgrnam.c >index 7073209..d75a460 100644 >--- a/source4/winbind/wb_cmd_getgrnam.c >+++ b/source4/winbind/wb_cmd_getgrnam.c >@@ -24,6 +24,7 @@ > #include "winbind/wb_server.h" > #include "winbind/wb_helper.h" > #include "smbd/service_task.h" >+#include "param/param.h" > > struct cmd_getgrnam_state { > struct composite_context *ctx; >@@ -105,6 +106,7 @@ static void cmd_getgrnam_recv_group_info(struct composite_context *ctx) > ctx->async.private_data, struct cmd_getgrnam_state); > struct libnet_GroupInfo *group_info; > struct winbindd_gr *gr; >+ char *group_name_with_domain; > > DEBUG(5, ("cmd_getgrnam_recv_group_info called\n")); > >@@ -117,7 +119,15 @@ static void cmd_getgrnam_recv_group_info(struct composite_context *ctx) > state->ctx->status = libnet_GroupInfo_recv(ctx, state, group_info); > if(!composite_is_ok(state->ctx)) return; > >- WBSRV_SAMBA3_SET_STRING(gr->gr_name, group_info->out.group_name); >+ group_name_with_domain = talloc_asprintf(gr, "%s%s%s", >+ state->workgroup_name, >+ lpcfg_winbind_separator(state->service->task->lp_ctx), >+ group_info->out.group_name); >+ if (composite_nomem(group_name_with_domain, state->ctx)) { >+ return; >+ } >+ >+ WBSRV_SAMBA3_SET_STRING(gr->gr_name, group_name_with_domain); > WBSRV_SAMBA3_SET_STRING(gr->gr_passwd, "*"); > gr->num_gr_mem = group_info->out.num_members; > gr->gr_mem_ofs = 0; >-- >1.7.9.5 > > >From 39acb9b63fd70c9b9ce706d3437beaa7f76f8c64 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Wed, 27 Feb 2013 01:04:46 +0100 >Subject: [PATCH 2/2] s4:winbindd: do not drop the workgroup name in the > getgrgid call > >Second part of fix for bug #9711. > >Signed-off-by: Michael Adam <obnox@samba.org> > >Reviewed-by: Andrew Bartlett <abartlet@samba.org> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Wed Feb 27 05:44:39 CET 2013 on sn-devel-104 >(cherry picked from commit bb0e4cbc3c30137245ca6b6cf9d74812ad17cee1) >--- > source4/winbind/wb_cmd_getgrgid.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/source4/winbind/wb_cmd_getgrgid.c b/source4/winbind/wb_cmd_getgrgid.c >index fe946ed..8ca93db 100644 >--- a/source4/winbind/wb_cmd_getgrgid.c >+++ b/source4/winbind/wb_cmd_getgrgid.c >@@ -23,6 +23,7 @@ > #include "libcli/composite/composite.h" > #include "winbind/wb_server.h" > #include "smbd/service_task.h" >+#include "param/param.h" > > struct cmd_getgrgid_state { > struct composite_context *ctx; >@@ -127,6 +128,7 @@ static void cmd_getgrgid_recv_group_info(struct composite_context *ctx) > struct cmd_getgrgid_state); > struct libnet_GroupInfo *group_info; > struct winbindd_gr *gr; >+ char *group_name_with_domain; > > DEBUG(5, ("cmd_getgrgid_recv_group_info called\n")); > >@@ -139,7 +141,15 @@ static void cmd_getgrgid_recv_group_info(struct composite_context *ctx) > state->ctx->status = libnet_GroupInfo_recv(ctx, state, group_info); > if (!composite_is_ok(state->ctx)) return; > >- WBSRV_SAMBA3_SET_STRING(gr->gr_name, group_info->out.group_name); >+ group_name_with_domain = talloc_asprintf(gr, "%s%s%s", >+ state->workgroup, >+ lpcfg_winbind_separator(state->service->task->lp_ctx), >+ group_info->out.group_name); >+ if (composite_nomem(group_name_with_domain, state->ctx)) { >+ return; >+ } >+ >+ WBSRV_SAMBA3_SET_STRING(gr->gr_name, group_name_with_domain); > WBSRV_SAMBA3_SET_STRING(gr->gr_passwd, "*"); > > gr->gr_gid = state->gid; >-- >1.7.9.5 >
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+
abartlet
:
review+
Actions:
View
Attachments on
bug 9711
: 8634