Chasing down bugs with access(2)

2010-07-20 Thread Garrett Cooper
Hi Hackers, I ran into an issue last night where apparently several apps make faulty assumptions w.r.t. whether or not access(2) returns functional data when running as a superuser. POSIX says: In early proposals, some inadequacies in the access() function led to the creation of an eacces

Re: Chasing down bugs with access(2)

2010-07-21 Thread Jaakko Heinonen
Hi, On 2010-07-20, Garrett Cooper wrote: > I ran into an issue last night where apparently several apps make > faulty assumptions w.r.t. whether or not access(2) returns functional > data when running as a superuser. > New implementations are discouraged from returning X_OK unless at > l

Re: Chasing down bugs with access(2)

2010-07-21 Thread Garrett Cooper
On Wed, Jul 21, 2010 at 1:40 AM, Bruce Evans wrote: > On Tue, 20 Jul 2010, Garrett Cooper wrote: ... > This seems wrong for directories.  It should say "... unless the file > is 'executable'".  'executable' means searchable for directories, and > the above shouldn't apply.  'executable' actually

Re: Chasing down bugs with access(2)

2010-07-21 Thread Bruce Evans
On Wed, 21 Jul 2010, Jaakko Heinonen wrote: On 2010-07-20, Garrett Cooper wrote: I ran into an issue last night where apparently several apps make faulty assumptions w.r.t. whether or not access(2) returns functional data when running as a superuser. New implementations are discourag

Re: Chasing down bugs with access(2)

2010-07-21 Thread Bruce Evans
On Tue, 20 Jul 2010, Garrett Cooper wrote: Hi Hackers, I ran into an issue last night where apparently several apps make faulty assumptions w.r.t. whether or not access(2) returns functional data when running as a superuser. POSIX says: In early proposals, some inadequacies in the access(

Re: Chasing down bugs with access(2)

2010-07-21 Thread Bruce Evans
On Wed, 21 Jul 2010, Garrett Cooper wrote: On Wed, Jul 21, 2010 at 1:40 AM, Bruce Evans wrote: - See a recent PR about unifdefed CAPABILITIES code in vaccess(). ?(The ?comment says that the code is always ifdefed out, but it now always ?unifdefed in.) ? I don't quite understand this code -- do

Re: Chasing down bugs with access(2)

2010-08-02 Thread Jaakko Heinonen
On 2010-07-21, Bruce Evans wrote: > > See PR kern/125009 (http://www.freebsd.org/cgi/query-pr.cgi?pr=125009). > > I looked at the patches in the PR. It seems reasonable to require an X > but for VEXEC for all file types except directories, like I think the > vaccess() version of your patch does.