Add fix from Simo for bug #5540 - missing code to substitute
authorJeremy Allison <jra@samba.org>
Mon, 14 Jul 2008 19:38:28 +0000 (12:38 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 14 Jul 2008 19:38:28 +0000 (12:38 -0700)
%u. Make this the same as other uses.
Jeremy.

source/groupdb/mapping.c

index ce66bfa64fa56229a4fd988ddb14962046921352..b952cda52300df78a76a43b89002fa11b353c3a4 100644 (file)
@@ -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;
                }