The Samba-Bugzilla – Attachment 7379 Details for
Bug 2191
[patch] %G / %g substitution does not correctly work in 'template homedir'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Ported first third of the patch
bso2191.diff (text/plain), 1.36 KB, created by
Lars Müller
on 2012-03-12 17:03:08 UTC
(
hide
)
Description:
Ported first third of the patch
Filename:
MIME Type:
Creator:
Lars Müller
Created:
2012-03-12 17:03:08 UTC
Size:
1.36 KB
patch
obsolete
>diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c >index 08cc03e..2d59b59 100644 >--- a/source3/lib/substitute.c >+++ b/source3/lib/substitute.c >@@ -606,7 +606,8 @@ char *talloc_sub_specified(TALLOC_CTX *mem_ctx, > const char *username, > const char *domain, > uid_t uid, >- gid_t gid) >+ gid_t gid; >+ const char *grpname) > { > char *a_string; > char *ret_string = NULL; >@@ -639,9 +640,14 @@ char *talloc_sub_specified(TALLOC_CTX *mem_ctx, > break; > case 'G' : > if (gid != -1) { >- a_string = talloc_string_sub( >- tmp_ctx, a_string, "%G", >- gidtoname(gid)); >+ if (grpname == NULL) >+ a_string = talloc_string_sub( >+ tmp_ctx, a_string, "%G", >+ gidtoname(gid)); >+ else >+ a_string = talloc_string_sub( >+ tmp_ctx, a_string, "%G", >+ grpname); > } else { > a_string = talloc_string_sub( > tmp_ctx, a_string, >@@ -650,9 +656,14 @@ char *talloc_sub_specified(TALLOC_CTX *mem_ctx, > break; > case 'g' : > if (gid != -1) { >- a_string = talloc_string_sub( >- tmp_ctx, a_string, "%g", >- gidtoname(gid)); >+ if (grpname == NULL) >+ a_string = talloc_string_sub( >+ tmp_ctx, a_string, "%g", >+ gidtoname(gid)); >+ else >+ a_string = talloc_string_sub( >+ tmp_ctx, a_string, "%g", >+ grpname); > } else { > a_string = talloc_string_sub( > tmp_ctx, a_string, "%g", "NO_GROUP");
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
Actions:
View
Attachments on
bug 2191
:
868
|
7379
|
9432
|
9477
|
9478
|
9601
|
9602
|
9639
|
9641