summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorwosch <wosch@FreeBSD.org>1997-09-20 18:26:22 +0000
committerwosch <wosch@FreeBSD.org>1997-09-20 18:26:22 +0000
commit49f61b81dab8b5672243e4243fdfa60ee5e566e8 (patch)
tree0eccb4da3e309a01c8091d7628d1b2a2a169ee22 /usr.sbin
parent7b5c64ab4741b063ab6b55338d3e4f6a32ac3813 (diff)
downloadFreeBSD-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.perl4
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;
OpenPOWER on IntegriCloud