From owner-freebsd-questions Mon Apr 5 4:25:59 1999 Delivered-To: freebsd-questions@freebsd.org Received: from alpha.comkey.com.au (alpha.comkey.com.au [203.9.152.215]) by hub.freebsd.org (Postfix) with SMTP id 0E04E14D14 for ; Mon, 5 Apr 1999 04:25:45 -0700 (PDT) (envelope-from gjb@comkey.com.au) Received: (qmail 652 invoked by uid 1001); 5 Apr 1999 01:13:09 -0000 Message-ID: <19990405011309.651.qmail@alpha.comkey.com.au> X-Posted-By: GBA-Post 1.04 06-Feb-1999 X-PGP-Fingerprint: 5A91 6942 8CEA 9DAB B95B C249 1CE1 493B 2B5A CE30 Date: Mon, 05 Apr 1999 11:13:09 +1000 From: Greg Black To: cjclark@home.com Cc: ben@scientia.demon.co.uk (Ben Smithurst), freebsd-questions@FreeBSD.ORG Subject: Re: Manpath strageness References: <199904020400.XAA08950@cc942873-a.ewndsr1.nj.home.com> In-reply-to: <199904020400.XAA08950@cc942873-a.ewndsr1.nj.home.com> of Thu, 01 Apr 1999 23:00:51 EST Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I eventually figured this out. I'd call it a bug. > > 'man' will fail to find a manpage if either of the files in the man* > or cat* directories exists, but is unreadable. That is if, > > -r--r----- 1 man man 9809 Nov 22 13:07 /usr/local/man/man1/procmail.1.gz > -r--r--r-- 1 man man 11488 Apr 1 21:21 /usr/local/man/cat1/procmail.1.gz I don't have time to look at the man sources right now, but this is the classic symptom of people using access(2) rather than following proper coding practices. The section of the access(2) man page that says that access() "should never be used" is in fact really good advice. It could also be argued that, in this particular case, the bug is with the installation of the .../man1/procmail.1.gz file, as it ought to have been installed with its permissions set to 0644 or 0444 rather than 0440. > [0] The fact that man thinks it has insufficient permissions is in > itself a bug. The manpages are all owned by man (as shown above), and > 'man' is a setuid command, This is part of the problem with access(2), which uses the real user/group ID rather than the effective user/group ID. The other part of the problem is covered by the generic expression "race conditions". -- Greg Black To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message