diff options
Diffstat (limited to 'adduser/adduser.perl')
-rw-r--r-- | adduser/adduser.perl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/adduser/adduser.perl b/adduser/adduser.perl index 8e35578..d2e6050 100644 --- a/adduser/adduser.perl +++ b/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.17 1996/09/11 08:36:54 jkh Exp $ +# $Id: adduser.perl,v 1.18 1996/09/14 23:22:23 wosch Exp $ # read variables @@ -394,6 +394,15 @@ sub add_group { $groupmembers{$gid} .= "," if $groupmembers{$gid}; $groupmembers{$gid} .= "$name"; + local(@l) = split(',', $groupmembers{$gid}); + # group(5): A group cannot have more than 200 members. + # The maximum line length of /etc/group is 1024 characters. + # Longer lines will be skiped. + if ($#l >= 200 || + length($groupmembers{$gid}) > 1024 - 50) { # 50 is for group name + warn "WARNING, maybe group line ``$gid{$gid}'' is to long or to\n" . + "much users in group, see group(5)\a\n"; + } return $name; } |