[Pkg-samba-maint] [samba] 127/135: s3-lib: Fix %G substitution for domain users in smbd
Ivo De Decker
ivodd at moszumanska.debian.org
Sat Jan 11 21:30:32 UTC 2014
This is an automated email from the git hooks/post-receive script.
ivodd pushed a commit to branch master
in repository samba.
commit 80c09fc1cd5a53271e82571f1423f6da10be898c
Author: Andreas Schneider <asn at samba.org>
Date: Wed Nov 27 17:21:01 2013 +0100
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 at samba.org>
Reviewed-by: Christian Ambach <ambi at samba.org>
Autobuild-User(master): Christian Ambach <ambi at 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 at samba.org>
Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-1-test): Sat Dec 14 23:47:20 CET 2013 on sn-devel-104
---
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(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list