diff options
author | 1998-07-20 07:20:58 +0000 | |
---|---|---|
committer | 1998-07-20 07:20:58 +0000 | |
commit | a72e0db5c013942cbe45b94d63999b75448e08ad (patch) | |
tree | 0028d313944802765af85164804f71a36eb918b5 | |
parent | typo repair; garath@garath.static.dialin.ntplx.com (diff) | |
download | wireguard-openbsd-a72e0db5c013942cbe45b94d63999b75448e08ad.tar.xz wireguard-openbsd-a72e0db5c013942cbe45b94d63999b75448e08ad.zip |
clone freebsd semantics for usernames; noted by abyss@abyss.imaji.net
-rw-r--r-- | usr.sbin/adduser/adduser.perl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index ec56d432a93..08ac1e026fd 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# $OpenBSD: adduser.perl,v 1.8 1998/06/03 05:36:57 deraadt Exp $ +# $OpenBSD: adduser.perl,v 1.9 1998/07/20 07:20:58 deraadt Exp $ # # Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. # All rights reserved. @@ -350,7 +350,7 @@ sub new_users_name { local($name); while(1) { - $name = &confirm_list("Enter username", 1, "A-Za-z0-9_", ""); + $name = &confirm_list("Enter username", 1, "a-z0-9_", ""); if (length($name) > 8) { warn "Username is longer than 8 chars\a\n"; next; @@ -363,7 +363,7 @@ sub new_users_name { sub new_users_name_valid { local($name) = @_; - if ($name !~ /^[a-z0-9]+$/) { + 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"; return 0; @@ -1442,7 +1442,7 @@ sub config_write { print C <<EOF; # -# $OpenBSD: adduser.perl,v 1.8 1998/06/03 05:36:57 deraadt Exp $ +# $OpenBSD: adduser.perl,v 1.9 1998/07/20 07:20:58 deraadt Exp $ # $config - automatic generated by adduser(8) # # Note: adduser read *and* write this file. |