From: Jeremy Allison Date: Mon, 14 Jul 2008 19:40:33 +0000 (-0700) Subject: Add fix from Simo for bug #5540 - missing code to substitute X-Git-Tag: samba-3.3.0pre1~550^2~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4a137e9789b06047ce53e5828fb5e1bb76aca06;p=thirdparty%2Fsamba.git Add fix from Simo for bug #5540 - missing code to substitute %u. Make this the same as other uses. Jeremy. --- 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; }