Re: Linux permissions and which(1)

2003-09-06 Thread moseley
On Fri, Sep 05, 2003 at 01:55:35PM -0700, Bill Moseley wrote: See it again... [EMAIL PROTECTED]:~/which-2.14$ which foo /usr/bin/foo [EMAIL PROTECTED]:~/which-2.14$ bash -c foo foo in /usr/bin [EMAIL PROTECTED]:~/which-2.14$ foo bash: /usr/local/bin/foo: Permission denied Ah, that's

POSIX spec (was: Linux permissions and which(1))

2003-09-06 Thread moseley
Ok, I'm seeing different behavior with differnet shells and different operating systems. I've tried looking for the POSIX spec to see the correct behavior but not having much luck with my googling skills today. Anyone know where to look up the POSIX spec on how a shell is suppose to use the

Re: Linux permissions and which(1)

2003-09-05 Thread Jacob Anawalt
Bill Moseley wrote: On Thu, Sep 04, 2003 at 09:45:53PM -0700, Bill Moseley wrote: I was looking at the source code to the which(1) command (apt-get source which = which-2.14 ). Just to add, the which(1) command installed on my Debian system is working correctly -- but only when I build

Re: Linux permissions and which(1)

2003-09-05 Thread Colin Watson
On Thu, Sep 04, 2003 at 10:03:52PM -0700, Bill Moseley wrote: On Thu, Sep 04, 2003 at 09:45:53PM -0700, Bill Moseley wrote: I was looking at the source code to the which(1) command (apt-get source which = which-2.14 ). Just to add, the which(1) command installed on my Debian system is

Re: Linux permissions and which(1)

2003-09-05 Thread Michael D Schleif
Colin Watson [EMAIL PROTECTED] [2003:09:05:09:53:35+0100] scribed: On Thu, Sep 04, 2003 at 10:03:52PM -0700, Bill Moseley wrote: On Thu, Sep 04, 2003 at 09:45:53PM -0700, Bill Moseley wrote: I was looking at the source code to the which(1) command (apt-get source which = which-2.14 ).

Re: Linux permissions and which(1)

2003-09-05 Thread Colin Watson
On Fri, Sep 05, 2003 at 10:32:48AM -0500, Michael D Schleif wrote: Colin Watson [EMAIL PROTECTED] [2003:09:05:09:53:35+0100] scribed: On Thu, Sep 04, 2003 at 10:03:52PM -0700, Bill Moseley wrote: On Thu, Sep 04, 2003 at 09:45:53PM -0700, Bill Moseley wrote: I was looking at the source

Re: Linux permissions and which(1)

2003-09-05 Thread Bill Moseley
On Fri, Sep 05, 2003 at 05:17:26PM +0100, Colin Watson wrote: OK, but what is the _correct_ behaviour, and where is it documented? The correct behaviour can be deduced easily from which(1): which returns the pathnames of the files which would be exe- cuted in the current

Linux permissions and which(1)

2003-09-04 Thread Bill Moseley
I was looking at the source code to the which(1) command (apt-get source which = which-2.14 ). As you might imagine, which(1) prepends the path to a name, checks if it exists and then checks if it's executable by the current process (your uid). In the which package is a file bash.c that

Re: Linux permissions and which(1)

2003-09-04 Thread Bill Moseley
On Thu, Sep 04, 2003 at 09:45:53PM -0700, Bill Moseley wrote: I was looking at the source code to the which(1) command (apt-get source which = which-2.14 ). Just to add, the which(1) command installed on my Debian system is working correctly -- but only when I build which(1) from the source

Re: Linux permissions and which(1)

2003-09-04 Thread Russell Shaw
Bill Moseley wrote: I was looking at the source code to the which(1) command (apt-get source which = which-2.14 ). As you might imagine, which(1) prepends the path to a name, checks if it exists and then checks if it's executable by the current process (your uid). In the which package is a