diff options
author | Michael Adam <obnox@samba.org> | 2013-02-27 01:04:46 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-02-27 05:44:39 +0100 |
commit | bb0e4cbc3c30137245ca6b6cf9d74812ad17cee1 (patch) | |
tree | 0342960ec0054c2e17567b260c141d5d980f74a0 /source4/winbind | |
parent | ecd0b10d2f1de986303f8aab2915c20c2f025244 (diff) | |
download | samba-bb0e4cbc3c30137245ca6b6cf9d74812ad17cee1.tar.gz samba-bb0e4cbc3c30137245ca6b6cf9d74812ad17cee1.tar.bz2 samba-bb0e4cbc3c30137245ca6b6cf9d74812ad17cee1.zip |
s4:winbindd: do not drop the workgroup name in the getgrgid call
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
Diffstat (limited to 'source4/winbind')
-rw-r--r-- | source4/winbind/wb_cmd_getgrgid.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/winbind/wb_cmd_getgrgid.c b/source4/winbind/wb_cmd_getgrgid.c index fe946ed257..8ca93db38e 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; |