diff options
author | Denis Vlasenko | 2008-03-19 23:15:26 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-03-19 23:15:26 +0000 |
commit | a7d6c8bab919e1a537f8b7db7b8676484e60f550 (patch) | |
tree | fd5d442775f7551b76d22563816d30b4fc6a6029 /loginutils/adduser.c | |
parent | cf7cf622046b0e1a2817e1da4aa8bc6f513b0153 (diff) | |
download | busybox-a7d6c8bab919e1a537f8b7db7b8676484e60f550.zip busybox-a7d6c8bab919e1a537f8b7db7b8676484e60f550.tar.gz |
adduser/addgroup: check username for invalid chars
(by Tito <farmatito AT tiscali.it>). +129 bytes when enabled.
Diffstat (limited to 'loginutils/adduser.c')
-rw-r--r-- | loginutils/adduser.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index d409eab..cd68015 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c @@ -111,6 +111,7 @@ int adduser_main(int argc ATTRIBUTE_UNUSED, char **argv) /* fill in the passwd struct */ pw.pw_name = argv[0]; + die_if_bad_username(pw.pw_name); if (!pw.pw_dir) { /* create string for $HOME if not specified already */ pw.pw_dir = xasprintf("/home/%s", argv[0]); |