From: Tim Hockin <thockin@hockin.org>
To: jw@pegasys.ws (jw schultz)
Cc: linux-kernel@vger.kernel.org (Linux Kernel Mailing List)
Subject: Re: [BK PATCH 1/4] fix NGROUPS hard limit (resend)
Date: Fri, 25 Oct 2002 11:17:29 -0700 (PDT) [thread overview]
Message-ID: <200210251817.g9PIHTw02950@www.hockin.org> (raw)
In-Reply-To: <20021025124901.GE10440@pegasys.ws> from "jw schultz" at Oct 25, 2002 05:49:01 AM
> example group file extract:
> webroot:x:103:www,jim,joy
> custadm:x:140:%webroot,bob,carol,ted,alice
> webcusts:x:1000:%webcust1,%webcust2,%webcust3
> webcust1:x:1001:%custadm,%custwebs,Matt,Christoph
> webcust2:x:1002:%custadm,%custwebs,Suparna,Aaron,Tim
> webcust3:x:1003:%custadm,%custwebs,Randal,Jesse
I've always wanted something like this. It really is not too difficult to
do, but it is entirely a library problem.
> Now, changing it at this level would require that
> the libs be updated (but so would infinite groups)
> and a way to inform the kernel of the nested group
> memberships.
unlimited groups requires a TRIVIAL change to libc.
> For informing the kernel i lean toward a sysfs
> interface fed by a user-space utility that would
> build or update a pinned table. The in-kernel group
> lists would be unrolled (per the example
> webroot=custadm,webcust1,webcust2,webcust3)
gahh..Why does the kernel need to know about a group and members? At login
time (or rather, setgroups() time, likely login, but could be other)
getgrent() or whatnot does a full expansion on the nested group file
(handling recursion properly!). You call setgroups() with the full list of
GIDs for your user. The kernel should not know about a group beyond a GID,
unless we're talking about vastly different semantics than traditional users
and groups.
> There would be problems with existing utilities due
problems with things that parse /etc/group. Not problems with things that
use the getgr*() functions.
> It also provides a way to have 400 (out of 16000)
> users in a group without infinite line length in
> /etc/group.
Line length is/was an real issue. Last I tried to do something like having
5000 users in a group, libc would not parse it. Can't say I've tried
lately. That, however, is another purely library problem.
> The important thing either way would be that you would save
> on memory for group lists and it would work over NFS without
> a protocol change.
No, it wouldn't work on NFS except to another system which understands this
scheme. The patch I proposed uses CoW grouplists. This is good
enough for the vast majority of cases - not too many apps call setgroups()
themselves, being a restricted syscall, and all that.
> I've actually wanted the nested group memberships for a long
> time.
So have I, but it is a different problem...Patches should be sent to
glibc developers.
next prev parent reply other threads:[~2002-10-25 18:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 0:36 Timothy Hockin
2002-10-22 1:39 ` Aaron Lehmann
2002-10-22 17:44 ` Tim Hockin
2002-10-22 9:51 ` Alan Cox
2002-10-22 17:26 ` Tim Hockin
2002-10-22 17:45 ` Alan Cox
2002-10-22 17:37 ` Tim Hockin
2002-10-22 18:03 ` Jesse Pollard
2002-10-22 18:21 ` Tim Hockin
2002-10-22 18:54 ` Rik van Riel
2002-10-22 19:12 ` Jesse Pollard
2002-10-22 19:39 ` Rik van Riel
2002-10-25 9:34 ` Panu Matilainen
2002-10-25 12:49 ` jw schultz
2002-10-25 18:17 ` Tim Hockin [this message]
2002-10-22 19:45 ` Mike Touloumtzis
2002-10-22 20:13 ` Jesse Pollard
2002-10-22 20:30 ` Mike Touloumtzis
2002-10-23 14:17 ` Jesse Pollard
2002-10-22 20:18 ` Hildo.Biersma
2002-10-23 2:41 ` Simon Kirby
[not found] <354127220@toto.iv>
2002-10-23 0:09 ` Peter Chubb
2002-10-23 10:16 Randal, Phil
2002-10-29 19:32 Timothy Hockin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200210251817.g9PIHTw02950@www.hockin.org \
--to=thockin@hockin.org \
--cc=jw@pegasys.ws \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®