Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Bullington <rbulling@obscure.org>
Subject: /etc/group maximum group size problem
Date: Mon, 18 Aug 1997 12:07:04 -0400 (EDT)	[thread overview]
Message-ID: <31ddc389360d610696ebc9ae7a089f35.axp-list@archive.invalid> (raw)

On Red Hat Linux 4.2 with all current patches applied, having a line in
/etc/group that surpasses a certain length causes the getgroups(),
initgroups() to return incomplete information.

I just moved the system from Red Hat 4.1, where there were no problems
with this. There are 166 user accounts on the system, and the 'users'
group was indeed 166 usernames long.

Experimentation showed that 67 users in the users group were OK, on a line
479 characters long, but 68 users broke getgroups() and initgroups() 
(judging from login attempts and the use of the "id" command, and doing
"ls -l" commands only to see numeric IDs in the upper groupid space). They
returned output that was correct up to the group in question, and then did
not show that group or any others beyond it.

I concocted a test line for /etc/groups, with users numbered 'u0..uN'. 
This worked where N=84, but failed where N=85. The usernames are bogus,
but that doesn't seem to affect the results. 

This line causes the failure of any groups that follow it:

killgrp::55:u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15,u16,u17,u18,u19,u20,u21,u22,u23,u24,u25,u26,u27,u28,u29,u30,u31,u32,u33,u34,u35,u36,u37,u38,u39,u40,u41,u42,u43,u44,u45,u46,u47,u48,u49,u50,u51,u52,u53,u54,u55,u56,u57,u58,u59,u60,u61,u62,u63,
u64,u65,u66,u67,u68,u69,u70,u71,u72,u73,u74,u75,u76,u77,u78,u79,u80,u81,u82,u83,u84,u85

I tested this under i386-architecture Red Hat 4.2, and it does not fail on
that architecture, at least with the test above where N <= 95. I did not
test beyond that, except to see that my 166-user group line did not cause
a failure.

I think this is the same problem reported in this message to the axp-list:

A Couple Glibc/NSS Bugs

   Daryll Strauss (daryll@d2.com)
   Mon, 14 Apr 1997 18:32:46 -0700 (PDT)

   My first bug is that the size of the NSS_BUFLEN_GROUP in grp.h is too
   small. In our case we have a group with 75 people in it. The 1024 byte
   buffer isn't big enough and lots of program die when they attempt to
   do getgrpbynam and get back a zero. I doubled the size of that buffer.

Does anyone know if this has been resolved in more recent gibc builds? I
would hope that the buffer size for something like that would be
reconfigurable without having to recompile glibc or NSS.

-Richard Bullington <rbulling@obscure.org>   http://www.obscure.org

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

             reply	other threads:[~1997-08-18 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-18 16:07 Richard Bullington [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-08-18 16:10 /etc/group maximum group size problem JD Williams
     [not found] <Pine.LNX.3.95.970818113056.15068A-100000@tiamat.obscure.org>
1997-08-21  6:25 ` Richard Henderson
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