From owner-freebsd-audit Tue Sep 4 9:47:59 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 1E22A37B40B; Tue, 4 Sep 2001 09:47:18 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f84GlB616365; Tue, 4 Sep 2001 19:47:11 +0300 (EEST) (envelope-from ru) Date: Tue, 4 Sep 2001 19:47:11 +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: <20010904194711.I1669@sunbay.com> References: <20010903201909.C29616@sunbay.com> <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 Unless I hear any intentions to review these patches, I am going to commit them tomorrow morning, local time. I know that your time is limited, but it would be nice to know if you ever going to review this. If so, please tell me your review's deadline. Thanks, 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. > > Please _REALLY_ review this now! > > > This bug was obtained from OpenBSD, but without mentioning > this in the commit log's ``Obtained from: '' field. The > bug is still present in OpenBSD. > On Mon, Sep 03, 2001 at 08:19:09PM +0300, Ruslan Ermilov wrote: > Hi! > > The attached patch replaces the ``wall -g'' functionality built > into dump(8) directly with the call to wall(1), thus making it > possible to drop the ``setgid tty'' privilege. > > The DIALUP check was weak, and was also removed. > > The patch is based on the OpenBSD's work. > > > I've posted another message to the -audit that makes ``wall -g'' > really work. > -- 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