Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Apr 1999 11:13:09 +1000
From:      Greg Black <gjb@comkey.com.au>
To:        cjclark@home.com
Cc:        ben@scientia.demon.co.uk (Ben Smithurst), freebsd-questions@FreeBSD.ORG
Subject:   Re: Manpath strageness 
Message-ID:  <19990405011309.651.qmail@alpha.comkey.com.au>
In-Reply-To: <199904020400.XAA08950@cc942873-a.ewndsr1.nj.home.com>  of Thu, 01 Apr 1999 23:00:51 EST
References:  <199904020400.XAA08950@cc942873-a.ewndsr1.nj.home.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <gjb@acm.org>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990405011309.651.qmail>