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)
busybox/loginutils/adduser.c

index 7fa05a01340baf8b1bf5a71a51a05fa095ba3d7f..58a733864e95c641182230cb02fddb6fb1bb3bb7 100644 (file)
@@ -117,7 +117,7 @@ static void addgroup_wrapper(const char *login, gid_t gid)
 {
        char *cmd;
 
-       bb_xasprintf(&cmd, "addgroup -g %d %s", gid, login);
+       bb_xasprintf(&cmd, "addgroup -g %d \"%s\"", gid, login);
        system(cmd);
        free(cmd);
 }