From owner-freebsd-audit Wed Sep 5 8:32:16 2001 Delivered-To: freebsd-audit@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 247D537B406; Wed, 5 Sep 2001 08:31:43 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f85FVd781473; Wed, 5 Sep 2001 18:31:39 +0300 (EEST) (envelope-from ru) Date: Wed, 5 Sep 2001 18:31:39 +0300 From: Ruslan Ermilov To: Warner Losh , Bruce Evans , Kris Kennaway , Mark Murray Cc: audit@FreeBSD.org Subject: Re: wall -g is broken Message-ID: <20010905183139.W96906@sunbay.com> References: <20010903192449.B29616@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010903192449.B29616@sunbay.com>; from ru@FreeBSD.org on Mon, Sep 03, 2001 at 07:24:49PM +0300 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This patch has been committed. On Mon, Sep 03, 2001 at 07:24:49PM +0300, Ruslan Ermilov wrote: > Hi! > > As the subject line says, ``wall -g'' appears to be broken. > > I feel somewhat confused, as the original list of reviewers > looks quite amazing: imp, bde, kris, markm, audit@. > > The use of the getgroups(3) function is unproven since: > > 1) Its first argument should specify the array size, and > is of type `int', not `gid_t'. > > 2) The code gives false matches and does not produce the > required matches. Instead of checking the membership > of each line's owner in the -g list of groups, the > code gives a match if at least one of the -g groups > matches those of the process's groups, as returned > by getgroups(). Thus, > > wall -g `id -gn` > > will match the entire ttys(5). > > The attached patch fixes this. -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message