From owner-freebsd-doc Thu Mar 1 3:10: 6 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1924137B719 for ; Thu, 1 Mar 2001 03:10:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f21BA3c63369; Thu, 1 Mar 2001 03:10:03 -0800 (PST) (envelope-from gnats) Date: Thu, 1 Mar 2001 03:10:03 -0800 (PST) Message-Id: <200103011110.f21BA3c63369@freefall.freebsd.org> To: freebsd-doc@freebsd.org Cc: From: Ben Smithurst Subject: Re: docs/25405: misleading warning from catman(1), etc. Reply-To: Ben Smithurst Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR docs/25405; it has been noted by GNATS. From: Ben Smithurst To: Rich Morin Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: docs/25405: misleading warning from catman(1), etc. Date: Thu, 1 Mar 2001 11:03:32 +0000 Rich Morin wrote: > Don't start this program as root, use: > echo /usr/bin/catman | nice -5 su -m man > > appears. There are really several problems here: > > 1) The program should check whether catman is actually > being run by root before issuing the warning. > > 2) If an error has occurred, the program should exit, > rather then going on to write root-owned files in > /usr/share/man/cat* (or wherever...). > > 3) The program should be clever enough to _do_ the > necessary work, rather than telling the user how to > do it. Basically, the programmer has gratuitously > broken the method of operation for a command. > > 4) The programmer's instructions to the user make use > of an undocumented feature of man(1). What, exactly, > is going on when we pipe this text string into man? RTFM... That's not what you're doing, you're passing the text string into 'su', which simply runs a shell as user 'man' which then executes the command /usr/bin/catman as that user. That's not to say the other points aren't valid, but I'm a bit busy at the moment, sorry. :-( Hopefully someone else can deal with it. -- Ben Smithurst / csxbcs@comp.leeds.ac.uk / ben@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message