From a7d6c8bab919e1a537f8b7db7b8676484e60f550 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 19 Mar 2008 23:15:26 +0000 Subject: adduser/addgroup: check username for invalid chars (by Tito ). +129 bytes when enabled. --- loginutils/adduser.c | 1 + 1 file changed, 1 insertion(+) (limited to 'loginutils/adduser.c') diff --git a/loginutils/adduser.c b/loginutils/adduser.c index d409eabb9..cd68015d1 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]); -- cgit v1.2.3-55-g6feb