lkml.org 
[lkml]   [2004]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: PATCH: report NGROUPS_MAX via a sysctl (read-only)
    Tim Hockin <thockin@sun.com> wrote:
    >
    > On Thu, Feb 19, 2004 at 09:30:28PM -0800, Andrew Morton wrote:
    > > > Attached is a simple patch to expose NGROUPS_MAX via sysctl.
    > >
    > > Why does userspace actually care? You try to do an oversized setgroups(),
    > > so you get an error?
    >
    > I am systematically tracking down apps that use it. glibc is almost free of
    > it. sysconf() still uses it, but as long as the value compiled into glibc
    > as NGROUPS_MAX is less-than-or-equal-to the current kernel's idea, it meets
    > POSIX, right? If any one goes into their kernel source and lowers
    > NGROUPS_MAX they might break things, but I guess that isn't too big of a
    > worry. Some apps are still assuming that the value they get from sysconf()
    > is the absolute max number of groups. Anyone with libc compiled against an
    > older kernel will see 32, when they could have 64k.

    OK, well certainly fishing the number out of the currently-running kernel
    is the one sure way of getting it right.

    > > And why does NGROUPS_MAX still exist, come to that? AFAICT the only thing
    >
    > Because Linus would not let me set it to INT_MAX. Something about
    > "insanity" ;)

    Is 64k enough?

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:01    [W:0.021 / U:29.808 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site