Re: When and where to check for function permissions - Mailing list pgsql-hackers

From Rocco Altier
Subject Re: When and where to check for function permissions
Date
Msg-id Pine.A41.4.21.0202141412590.332622-100000@apdev.insight
Whole thread Raw
In response to Re: When and where to check for function permissions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 13 Feb 2002, Tom Lane wrote:

> Peter Eisentraut <peter_e@gmx.net> writes:
> 
> > You could say Unix shells
> > are brain-dead, too, because they do the same thing.
> 
> They do?  How so?  Last I checked, trying to execute a program I didn't
> have exec rights to gave "no permissions", not "not found", and
> certainly not "use the next one down the PATH instead".
> 

That is only true if you give a fully qualified path to the program.  

For example, if you try to run the command as "ls" (instead of /bin/ls),
you will get the first executable program "ls" in your path.

If an administrator happened to create a file (without execute) named
"ls" near the beginning of your path (say /usr/local/bin), then it would
break, which it does not.

If it was executable, it would get called instead by being first in the
path.  Granted some shells, eg. bash, will cache the path to the command
on it first lookup and need to be rehashed (hash -r).
-rocco



pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: pre-alpha release of OpenFTS (perl version) is available for testing
Next
From: Thomas Lockhart
Date:
Subject: Re: FWD: overlaps() bug?