From nobody@FreeBSD.org  Sat Jul 27 13:22:55 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AAB3937B400
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Jul 2002 13:22:55 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 523CC43E3B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Jul 2002 13:22:55 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g6RKMsOT031151
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Jul 2002 13:22:54 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g6RKMsL0031150;
	Sat, 27 Jul 2002 13:22:54 -0700 (PDT)
Message-Id: <200207272022.g6RKMsL0031150@www.freebsd.org>
Date: Sat, 27 Jul 2002 13:22:54 -0700 (PDT)
From: Graham Wharton <graham@pageinabox.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Limit set on the number of groups a user can be in.
X-Send-Pr-Version: www-1.0

>Number:         41058
>Category:       misc
>Synopsis:       Limit set on the number of groups a user can be in.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 27 13:30:01 PDT 2002
>Closed-Date:    Sat Jul 27 14:51:24 PDT 2002
>Last-Modified:  Sat Jul 27 14:51:24 PDT 2002
>Originator:     Graham Wharton
>Release:        4.6-RELEASE
>Organization:
Pageinabox
>Environment:
FreeBSD lucy.pageinabox.com 4.6-RELEASE-p1 FreeBSD 4.6-RELEASE-p1 #7: Sun Jul  7 23:19:25 BST 2002     root@lucy.pageinabox.com:/usr/obj/usr/src/sys/LUCY  i386

>Description:
Single user, member of multiple groups.

I have multiple users on the system. Each user has its own group.

I would like to have a single user that can access files in the users home dir's if they set the relevant group read/write bits.

So I add the global user to each of the users groups.

This works fine until the global user is a member of 15 groups.

Adding the user to successive groups works, but the global user is unable to access any files that are g+r on any groups that were added after the 14th.
>How-To-Repeat:
example :

cat /etc/groups

globaluser:*:1000:
user1:*:1001:globaluser
user2:*:1002:globaluser
user3:*:1003:globaluser
user4:*:1004:globaluser
user5:*:1005:globaluser
user6:*:1006:globaluser
user7:*:1007:globaluser
user8:*:1008:globaluser
user9:*:1009:globaluser
user10:*:1010:globaluser
user11:*:1011:globaluser
user12:*:1012:globaluser
user13:*:1013:globaluser
user14:*:1014:globaluser
user15:*:1015:globaluser
user16:*:1016:globaluser
      
cd /home
ls -al

drwxr-x---   3 user1  user1  512 Jul 26 21:26 user1
drwxr-x---   3 user2  user2  512 Jul 26 21:26 user2
drwxr-x---   3 user3  user3  512 Jul 26 21:26 user3
drwxr-x---   3 user4  user4  512 Jul 26 21:26 user4
drwxr-x---   3 user5  user5  512 Jul 26 21:26 user5
drwxr-x---   3 user6  user6  512 Jul 26 21:26 user6
drwxr-x---   3 user7  user7  512 Jul 26 21:26 user7
drwxr-x---   3 user8  user8  512 Jul 26 21:26 user8
drwxr-x---   3 user9  user9  512 Jul 26 21:26 user9
drwxr-x---   3 user10  user10  512 Jul 26 21:26 user10
drwxr-x---   3 user11  user11  512 Jul 26 21:26 user11
drwxr-x---   3 user12  user12  512 Jul 26 21:26 user12
drwxr-x---   3 user13  user13  512 Jul 26 21:26 user13
drwxr-x---   3 user14  user14  512 Jul 26 21:26 user14
drwxr-x---   3 user15  user15  512 Jul 26 21:26 user15
drwxr-x---   3 user16  user16  512 Jul 26 21:26 user16

su globaluser

ls -al user1
drwxr-x---   3 user1 user1  512 Jul 26 21:26 .
drwxr-xr-x  22 root  wheel  512 Jul 27 19:54 ..

ls -al user10
drwxr-x---   3 user10 user10  512 Jul 26 21:26 .
drwxr-xr-x  22 root  wheel  512 Jul 27 19:54 ..

ls -al user15
ls: user15: Permission denied

>Fix:
      
>Release-Note:
>Audit-Trail:

From: "Graham Wharton" <graham@gwsoft.co.uk>
To: <freebsd-gnats-submit@FreeBSD.org>, <graham@pageinabox.com>
Cc:  
Subject: Re: misc/41058: Limit set on the number of groups a user can be in.
Date: Sat, 27 Jul 2002 21:53:10 +0100

 Just noticed.
 
 sys/syslimits.h:#define NGROUPS_MAX                16   /* max supplemental
 group id's */
 
 Not so much a bug report now.
 
 Is this just a value plucked from mid air or is there a reason for not
 allowing a user to be in more than 16 groups.
 
 Graham Wharton
 
 
State-Changed-From-To: open->closed 
State-Changed-By: wollman 
State-Changed-When: Sat Jul 27 14:51:08 PDT 2002 
State-Changed-Why:  
Not a bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41058 
>Unformatted:
