diff options
author | yar <yar@FreeBSD.org> | 2002-01-28 17:30:12 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2002-01-28 17:30:12 +0000 |
commit | 261a4fd963a7c4766c3b74218b1e2d9f4d567ee9 (patch) | |
tree | 70fd7f83817aa592ee6921f8836c62930b190556 /usr.sbin/adduser | |
parent | a2c8c0621808fb5b0537590a666ef52160870cd2 (diff) | |
download | FreeBSD-src-261a4fd963a7c4766c3b74218b1e2d9f4d567ee9.zip FreeBSD-src-261a4fd963a7c4766c3b74218b1e2d9f4d567ee9.tar.gz |
Disallow adding duplicate roots, toors, or other users w/uid 0.
Previously, a truth check instead if defined() check erroneously
allowed that.
PR: bin/8745
Diffstat (limited to 'usr.sbin/adduser')
-rw-r--r-- | usr.sbin/adduser/adduser.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index 2728eff..2aa9c31 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -345,7 +345,7 @@ sub new_users_name_valid { warn "Username doesn't match the regexp /$usernameregexp/\a\n"; } return 0; - } elsif ($username{$name}) { + } elsif (defined($username{$name})) { warn "Username ``$name'' already exists!\a\n"; return 0; } return 1; |