summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-07-14 12:40:33 -0700
committerJeremy Allison <jra@samba.org>2008-07-14 12:40:33 -0700
commitb6344d1d459479063fee85c0f12bb9f0f3292dcf (patch)
treef6d6f9efdcbf3d4ae36c8792be65fe53682e6c7c
parentdf1554192683aacc518c4a95715089d4eab51192 (diff)
downloadsamba-b6344d1d459479063fee85c0f12bb9f0f3292dcf.tar.gz
samba-b6344d1d459479063fee85c0f12bb9f0f3292dcf.tar.bz2
samba-b6344d1d459479063fee85c0f12bb9f0f3292dcf.zip
Add fix from Simo for bug #5540 - missing code to substitute
%u. Make this the same as other uses. Jeremy. (This used to be commit c4a137e9789b06047ce53e5828fb5e1bb76aca06)
-rw-r--r--source3/groupdb/mapping.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index ce66bfa64f..b952cda523 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -297,9 +297,12 @@ int smb_set_primary_group(const char *unix_group, const char* unix_user)
return -1;
}
add_script = talloc_all_string_sub(ctx,
- add_script,
- "%g",
- unix_group);
+ add_script, "%g", unix_group);
+ if (!add_script) {
+ return -1;
+ }
+ add_script = talloc_string_sub(ctx,
+ add_script, "%u", unix_user);
if (!add_script) {
return -1;
}