The Samba-Bugzilla – Attachment 9523 Details for
Bug 10286
%G is not expanded in a service path
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
v4-0-test patch
0001-s3-lib-Fix-G-substitution-for-domain-users-in-smbd.patch (text/plain), 1.41 KB, created by
Andreas Schneider
on 2013-12-11 13:11:54 UTC
(
hide
)
Description:
v4-0-test patch
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2013-12-11 13:11:54 UTC
Size:
1.41 KB
patch
obsolete
>From 99787a83ba01357908f8e83cd17823414ae45800 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Wed, 27 Nov 2013 17:21:01 +0100 >Subject: [PATCH] s3-lib: Fix %G substitution for domain users in smbd > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=10286 >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Christian Ambach <ambi@samba.org> > >Autobuild-User(master): Christian Ambach <ambi@samba.org> >Autobuild-Date(master): Tue Dec 10 16:39:43 CET 2013 on sn-devel-104 > >(cherry picked from commit 8eef4ab79ec5fb7e96ad2f2ad6c9bf30db13a50d) >Signed-off-by: Andreas Schneider <asn@samba.org> >--- > source3/lib/substitute.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c >index ca2ac79..937f02c 100644 >--- a/source3/lib/substitute.c >+++ b/source3/lib/substitute.c >@@ -499,10 +499,20 @@ char *talloc_sub_basic(TALLOC_CTX *mem_ctx, > break; > case 'G' : { > struct passwd *pass; >- r = talloc_strdup(tmp_ctx, smb_name); >+ >+ if (domain_name != NULL && domain_name[0] != '\0') { >+ r = talloc_asprintf(tmp_ctx, >+ "%s%c%s", >+ domain_name, >+ *lp_winbind_separator(), >+ smb_name); >+ } else { >+ r = talloc_strdup(tmp_ctx, smb_name); >+ } > if (r == NULL) { > goto error; > } >+ > pass = Get_Pwnam_alloc(tmp_ctx, r); > if (pass != NULL) { > a_string = realloc_string_sub( >-- >1.8.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:
ambi
:
review+
Actions:
View
Attachments on
bug 10286
:
9461
|
9486
|
9522
| 9523 |
11784