From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 27 11:10:44 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4197516A418 for ; Thu, 27 Sep 2007 11:10:44 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id D8FC813C4AC for ; Thu, 27 Sep 2007 11:10:43 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 2300F45F44; Thu, 27 Sep 2007 13:10:42 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 0CEC945E97; Thu, 27 Sep 2007 13:10:32 +0200 (CEST) Date: Thu, 27 Sep 2007 13:09:00 +0200 From: Pawel Jakub Dawidek To: "rsync.net" Message-ID: <20070927110900.GD1193@garage.freebsd.pl> References: <20070925093722.N21960@mail.rsync.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mR8QP4gmHujQHb1c" Content-Disposition: inline In-Reply-To: <20070925093722.N21960@mail.rsync.net> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-hackers@freebsd.org Subject: Re: kern.ngroups (non) setting ... new bounty ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2007 11:10:44 -0000 --mR8QP4gmHujQHb1c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 25, 2007 at 09:51:06AM -0700, rsync.net wrote: >=20 > It has been impossible to change kern.ngroups - at least for several years > now. It was not fixed in either 5.x or 6.x : >=20 > http://lists.freebsd.org/pipermail/freebsd-bugs/2007-January/022140.html >=20 > It is seemingly a difficult problem: >=20 > http://www.atm.tut.fi/list-archive/freebsd-stable/msg09969.html [1] >=20 > However it should be solved - we can't be the only ones out there trying > to add a UID to more than 16 groups... >=20 >=20 > ----- >=20 >=20 > The rsync.net code bounties have been fairly successful this year - two of > the five projects have been completed, and the large "vmware 6 on FreeBSD" > project is now underway. >=20 > We'd like to add a new bounty for this kern.ngroups issue. We are posting > to -hackers today to get some feedback on how long this will take and how > much money might reasonably be expected to lure this work. >=20 >=20 > --rsync.net Support >=20 >=20 >=20 > [1] Is it indeed true that these programs are broken by not following > NGROUPS_MAX from syslimits.h? I don't see how they can be broken. They may not see more than 16 groups, but they shouldn't blow up. The only possibility of bad usage I see is something like this: gid_t gids[NGROUPS_MAX]; int gidsetlen; gidsetlen =3D getgroups(0, NULL); getgroups(gidsetlen, gids); But I guess the most common use is: gid_t gids[NGROUPS_MAX]; int gidsetlen; gidsetlen =3D getgroups(NGROUPS_MAX, gids); Binaries using the latter method should be just fine. BTW. The latter method is what all utilities from the base system use. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --mR8QP4gmHujQHb1c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFG+49MForvXbEpPzQRArKLAJwMvA85vNuEiUlKkFDO2qmbPkrvIgCfQiO2 LMGAyT+FfATQk1YIbG9Jy/w= =j8gH -----END PGP SIGNATURE----- --mR8QP4gmHujQHb1c--