From owner-freebsd-arch Fri Feb 16 0: 9: 0 2001 Delivered-To: freebsd-arch@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 765D937B491; Fri, 16 Feb 2001 00:08:46 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.0/8.11.0) id f1G88Yx04908; Fri, 16 Feb 2001 10:08:34 +0200 (EET) (envelope-from ru) Date: Fri, 16 Feb 2001 10:08:34 +0200 From: Ruslan Ermilov To: Robert Watson Cc: arch@FreeBSD.org Subject: Re: [Call for *quick* review] architecture-specific manpages Message-ID: <20010216100833.G2869@sunbay.com> Mail-Followup-To: Robert Watson , arch@FreeBSD.org References: <20010215211404.A44780@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: ; from rwatson@FreeBSD.org on Thu, Feb 15, 2001 at 04:23:15PM -0500 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Feb 15, 2001 at 04:23:15PM -0500, Robert Watson wrote: > On Thu, 15 Feb 2001, Ruslan Ermilov wrote: > > > The attached patch implements one nice feature of original BSD man(1), > > to look into the machine-specific subdirectory, specifically: > > > > : As some manual pages are intended only for specific architectures, > > : man searches any subdirectories, with the same name as the current > > : architecture, in every directory which it searches. Machine specific > > : areas are checked before general areas. The current machine type may > > : be overridden by setting the environment variable MACHINE to the name > > : of a specific architecture. > > > > This would eliminate the need to MLINK every arch-specific file to the > > parent directory, and would allow us to have both architecture-specific > > and generic manpages with the same name in the same section. > > It's a good idea to check the results of calls like snprintf or you can > get truncation bugs. I'd recommend you go pass these patches by -audit. > Any time you have programs running with privilege of some sort (and yes, > setuid man or setgid man counts as privilege), you have to be *really* > careful. These patches do not appear to be very careful at all, and they > seem to make heavy use of environmental variables in constructing strings. > Oh common, you can supply whatever you want in $MANPATH, and have man(1) look into whatever path you tell it to. The setgidness of man(1) is only to allow creation of catpages, and does not hurt everything else. Two days ago I fixed the bug in manpath that would allow a malicious user create empty catpages, and sent the notice to security-officer (which you are a member of). I got no replies so far, and I am a bit confused since (in my opinion) this definitely deserves the security advisory. > I'd personally feel a lot more comfortable with all this if we'd simply > remove the setuid/setgid man'ness of man, and either pre-generate cached > pages as appropriate, or simply eschew caching, given the speed of modern > machines. > Not everyone has the ability to buy the "modern" machine, so disabling catpages building would not work. Just delete cat* subdirectories, and man(1) will intelligently skip creating catpages for you. -- 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-arch" in the body of the message