diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-04-30 19:20:25 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-04-30 19:20:25 +0000 |
commit | 7439966a40c9d6d09c5dba55c87f389991fca16f (patch) | |
tree | d7de09179bdab409a1acde7ba2c5599eb8921051 /usr.sbin/adduser/adduser.perl | |
parent | 0c3f2f64362aaf59d1fd86d6a43ec8517b6b8649 (diff) | |
download | src-7439966a40c9d6d09c5dba55c87f389991fca16f.tar.gz src-7439966a40c9d6d09c5dba55c87f389991fca16f.zip |
Don't accept usernames longer than 8 characters
Submitted by: Wolfram Schneider <wosch@cs.tu-berlin.de>
Notes
Notes:
svn path=/head/; revision=8190
Diffstat (limited to 'usr.sbin/adduser/adduser.perl')
-rw-r--r-- | usr.sbin/adduser/adduser.perl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index aefe84aa38b6..ab09e1d790d0 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -32,7 +32,7 @@ # # Email: Wolfram Schneider <wosch@cs.tu-berlin.de> # -# $Id: adduser.perl,v 1.4 1995/03/08 22:44:37 ache Exp $ +# $Id: adduser.perl,v 1.5 1995/04/09 03:34:10 ache Exp $ # # read variables @@ -306,6 +306,10 @@ sub new_users_name { while(1) { $name = &confirm_list("Enter username", 1, "a-z0-9", ""); + if (length($name) > 8) { + warn "Username is longer than 8 chars\a\n"; + next; + } last if (&new_users_name_valid($name) eq $name); } return $name; |