From 966653491655dedee6db182b75bcbd9c4bc39d70 Mon Sep 17 00:00:00 2001 From: Yaroslav Tykhiy Date: Wed, 2 Jan 2002 16:19:14 +0000 Subject: [PATCH] Be consistent in what restriction is imposed on a username in the code and what the warning message reads. --- usr.sbin/adduser/adduser.perl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index 421cf028eb61..9084d22262dc 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -328,8 +328,10 @@ sub new_users_name_valid { local($name) = @_; if ($name !~ /^[a-z0-9_][a-z0-9_\-]*$/ || $name eq "a-z0-9_-") { - warn "Wrong username. " . - "Please use only lowercase characters or digits\a\n"; + warn "Illegal username.\n" . + "Please use only lowercase Roman, decimal, underscore, " . + "or hyphen characters.\n" . + "Additionally, a username should not start with a hyphen.\a\n"; return 0; } elsif ($username{$name}) { warn "Username ``$name'' already exists!\a\n"; return 0;