Quote the user we pass to addgroup so funky chars are preserved. Fix by dragan_marinkovic in Bug 544

This commit is contained in:
Mike Frysinger 2005-11-15 05:53:00 +00:00
parent 79e1cab0d1
commit 4ee2eee2fc

View 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);
}