diff options
author | Jeremy Allison <jra@samba.org> | 2008-07-14 12:38:28 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-07-16 09:25:41 +0200 |
commit | 4ebf728091e56621d3f62d56b50fc58085b384f0 (patch) | |
tree | fabdf89afd317750cb16edc64b206a84acb1e2c2 | |
parent | c80a21e752a8f69bffbcb5d4d4a967a03f50d055 (diff) | |
download | samba-4ebf728091e56621d3f62d56b50fc58085b384f0.tar.gz samba-4ebf728091e56621d3f62d56b50fc58085b384f0.tar.xz samba-4ebf728091e56621d3f62d56b50fc58085b384f0.zip |
Add fix from Simo for bug #5540 - missing code to substitute
%u. Make this the same as other uses.
Jeremy.
(cherry picked from commit 56d8ed48a94b558ad442e38c3d1925c4810dc508)
-rw-r--r-- | source/groupdb/mapping.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/groupdb/mapping.c b/source/groupdb/mapping.c index ce66bfa64fa..b952cda5230 100644 --- a/source/groupdb/mapping.c +++ b/source/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; } |