Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2009 15:58:24 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/lib/libc/gen initgroups.3 initgroups.c src/lib/libc/rpc auth_unix.c src/lib/libc/sys getgroups.2 setgroups.2 src/usr.bin/id id.c src/usr.bin/newgrp newgrp.c src/usr.bin/quota quota.c src/usr.sbin/chown chown.c ...
Message-ID:  <200906191604.n5JG4n3n055194@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
brooks      2009-06-19 15:58:24 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/gen         initgroups.3 initgroups.c 
    lib/libc/rpc         auth_unix.c 
    lib/libc/sys         getgroups.2 setgroups.2 
    usr.bin/id           id.c 
    usr.bin/newgrp       newgrp.c 
    usr.bin/quota        quota.c 
    usr.sbin/chown       chown.c 
    usr.sbin/chroot      chroot.c 
    usr.sbin/jail        jail.c 
    usr.sbin/jexec       jexec.c 
    usr.sbin/lpr/lpc     lpc.c 
  Log:
  SVN rev 194494 on 2009-06-19 15:58:24Z by brooks
  
  In preparation for raising NGROUPS and NGROUPS_MAX, change base
  system callers of getgroups(), getgrouplist(), and setgroups() to
  allocate buffers dynamically.  Specifically, allocate a buffer of size
  sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow).
  
  This (or similar gymnastics) is required for the code to actually follow
  the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime
  and where getgroups may return {NGROUPS_MAX}+1 results on systems like
  FreeBSD which include the primary group.
  
  In id(1), don't pointlessly add the primary group to the list of all
  groups, it is always the first result from getgroups().  In principle
  the old code was more portable, but this was only done in one of the two
  places where getgroups() was called to the overall effect was pointless.
  
  Document the actual POSIX requirements in the getgroups(2) and
  setgroups(2) manpages.  We do not yet support a dynamic NGROUPS, but we
  may in the future.
  
  MFC after:      2 weeks
  
  Revision  Changes    Path
  1.14      +7 -0      src/lib/libc/gen/initgroups.3
  1.10      +15 -6     src/lib/libc/gen/initgroups.c
  1.19      +12 -6     src/lib/libc/rpc/auth_unix.c
  1.14      +6 -4      src/lib/libc/sys/getgroups.2
  1.16      +2 -4      src/lib/libc/sys/setgroups.2
  1.35      +18 -7     src/usr.bin/id/id.c
  1.3       +8 -4      src/usr.bin/newgrp/newgrp.c
  1.35      +8 -2      src/usr.bin/quota/quota.c
  1.30      +6 -2      src/usr.sbin/chown/chown.c
  1.12      +7 -3      src/usr.sbin/chroot/chroot.c
  1.30      +7 -2      src/usr.sbin/jail/jail.c
  1.12      +7 -2      src/usr.sbin/jexec/jexec.c
  1.32      +6 -2      src/usr.sbin/lpr/lpc/lpc.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906191604.n5JG4n3n055194>