tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Kristian Koehntopp <kris () oekoalpha ! pz-oekosys ! uni-kiel ! d400 ! de>
To: tru64-unix-managers
Subject: SUMMARY: Number of users in one group (revisited)
Date: Thu, 01 Jun 1995 14:24:02 +0000	[thread overview]
Message-ID: <96075320706371.tru64-unix-managers.marc@archive.invalid> (raw)


There was a summary regarding the max. number of users in one group from
another person in this list some days ago. After reading this summary, I
still had some questions; most of these I was able to answer myself.

One question remained open. I asked:
> Also, I cannot come up why there should be a limit on the number of users
> per group. What is the limiting factor here?

Answers came in from:
	haymanr@icefog.uacn.alaska.edu
	"Guy Helmer" <ghelmer@alpha.dsu.edu>
	"Anthony D'Atri" <aad@statsci.com>

Randy Hayman wrote:
> The limit is the size of the buffer which holds the username entries in the 
> group file, consequently the line size of the group entry in /etc/group.

Guy Helmer explained the problem more detailed:
> There is a limit on the line length (1024 bytes) and # of users per group
> (200) in the BSD Net-2 getgrent.c [which contains getgrent(3) / getgrnam(3)
> / getgrgid(3)] source code, which is probably a close relative to the code
> used in OSF/1.  OSF/1 also has a set of related functions that allow the
> caller to provide a longer line buffer, but there isn't any indication in
> the manual page for getgrent(3) of a limit on the number of users per
> group...

The getgrent_r function is mainly provided as a reentrant version of
getgrent so it can be used in a multithreaded environment, according to the
manual page.

> The BSD Net-2 getgrent.c code contains a neat little feature where it
> completely skips lines that are longer than the acceptable line length; 
> if OSF/1 works the same way, one would probably be in for a surprise if
> she/he exceeded the line length limit. 

Anthony D'Atri suggested a workaround for this limitation. In my original
mail to the list I wrote
>I was not aware of the fact that group names can be used in field 4 of the
>group file. The documentation of group(4) only mentions user names. Does
>this really work?

His suggestion:
> Not to my knowledge.  If you want to be safe, just make multiple groups
> with the same gid and different names.

Kristian

                 reply	other threads:[~1995-06-01 14:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox