diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2002-02-23 18:54:56 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2002-02-23 18:54:56 +0000 |
commit | 0bcf017689e6646a728a88dbba06660474420a1e (patch) | |
tree | 3553b153469007594b83e8ca7d7ef2e4d3c315be /usr.sbin/adduser | |
parent | 72c5b2eaa994da9388f9cd8416af006210047999 (diff) |
check that user is not in group more thoroughly (don't assume anything
about group contents).
ok millert@
Diffstat (limited to 'usr.sbin/adduser')
-rw-r--r-- | usr.sbin/adduser/adduser.perl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index 2be1ffb87e2..f9f94c175ae 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# $OpenBSD: adduser.perl,v 1.35 2002/02/18 21:40:08 ericj Exp $ +# $OpenBSD: adduser.perl,v 1.36 2002/02/23 18:54:55 espie Exp $ # # Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. # All rights reserved. @@ -89,7 +89,7 @@ sub variables { $group = "/etc/group"; $pwd_mkdb = "pwd_mkdb -p"; # program for building passwd database $encryptionmethod = "blowfish"; - $rcsid = '$OpenBSD: adduser.perl,v 1.35 2002/02/18 21:40:08 ericj Exp $'; + $rcsid = '$OpenBSD: adduser.perl,v 1.36 2002/02/23 18:54:55 espie Exp $'; # List of directories where shells located @path = ('/bin', '/usr/bin', '/usr/local/bin'); @@ -446,7 +446,7 @@ sub add_group { local($gid, $name) = @_; return 0 if - $groupmembers{$gid} =~ /^(.+,)?$name(,.+)?$/; + $groupmembers{$gid} =~ /^(.*,)?$name(,.*)?$/; $groupmembers_bak{$gid} = $groupmembers{$gid}; $groupmembers{$gid} .= "," if $groupmembers{$gid}; |