diff options
author | wosch <wosch@FreeBSD.org> | 1997-09-20 18:26:22 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1997-09-20 18:26:22 +0000 |
commit | 49f61b81dab8b5672243e4243fdfa60ee5e566e8 (patch) | |
tree | 0eccb4da3e309a01c8091d7628d1b2a2a169ee22 /usr.sbin | |
parent | 7b5c64ab4741b063ab6b55338d3e4f6a32ac3813 (diff) | |
download | FreeBSD-src-49f61b81dab8b5672243e4243fdfa60ee5e566e8.zip FreeBSD-src-49f61b81dab8b5672243e4243fdfa60ee5e566e8.tar.gz |
Do not accept empty user names.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/adduser/adduser.perl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index 24be225..9378bf8 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $Id: adduser.perl,v 1.34 1997/07/31 15:24:37 pst Exp $ +# $Id: adduser.perl,v 1.35 1997/08/26 22:47:51 wosch Exp $ # read variables @@ -317,7 +317,7 @@ sub new_users_name { sub new_users_name_valid { local($name) = @_; - if ($name !~ /^[a-z0-9_][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; |