diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-07-11 21:58:15 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-07-11 21:58:15 +0000 |
commit | 00cc05862a5f43340f7d475dcc814315f3851e3d (patch) | |
tree | f87a5f75f29cad02ac41e75b957fe60f9e28278d | |
parent | b16f331af9465a9af3a4a0017b161841256deb5c (diff) |
Fix check for valid user name in interactive use
-rw-r--r-- | usr.sbin/adduser/rmuser.perl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/adduser/rmuser.perl b/usr.sbin/adduser/rmuser.perl index d19add58a83..258a88c1b21 100644 --- a/usr.sbin/adduser/rmuser.perl +++ b/usr.sbin/adduser/rmuser.perl @@ -1,7 +1,7 @@ #!/usr/bin/perl # -*- perl -*- # -# $OpenBSD: rmuser.perl,v 1.1 1996/12/08 13:57:09 downsj Exp $ +# $OpenBSD: rmuser.perl,v 1.2 1999/07/11 21:58:14 espie Exp $ # # Copyright 1995, 1996 Guy Helmer, Madison, South Dakota 57042. # All rights reserved. @@ -232,7 +232,7 @@ sub get_login_name { print "Enter login name for user to remove: "; $login_name = <>; chop $login_name; - if (!($login_name =~ /[A-Za-z0-9_]/)) { + if (!($login_name =~ /^\w+$/)) { print STDERR "Sorry, login name must contain alphanumeric characters only.\n"; } elsif (length($login_name) > 16 || length($login_name) == 0) { print STDERR "Sorry, login name must be 16 characters or less.\n"; |