Quote the user we pass to addgroup so funky chars are preserved. Fix by dragan_marin...
authorMike Frysinger <vapier@gentoo.org>
Tue, 15 Nov 2005 05:53:00 +0000 (05:53 -0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 15 Nov 2005 05:53:00 +0000 (05:53 -0000)
loginutils/adduser.c

index 1630c72ba1cd4a32e02d234123063a83dd941dea..5ff0cd962ec626162ce5e748d663dd8d7359b9ff 100644 (file)
@@ -117,7 +117,7 @@ static void addgroup_wrapper(const char *login, gid_t gid)
 {
        char *cmd;
 
-       cmd = bb_xasprintf("addgroup -g %d %s", gid, login);
+       cmd = bb_xasprintf("addgroup -g %d \"%s\"", gid, login);
        system(cmd);
        free(cmd);
 }