Re: When and where to check for function permissions

From: Rocco Altier <roccoa(at)routescape(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: When and where to check for function permissions
Date: 2002-02-14 19:27:52
Message-ID: Pine.A41.4.21.0202141412590.332622-100000@apdev.insight
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 13 Feb 2002, Tom Lane wrote:

> Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2002-02-14 19:36:02 pre-alpha release of OpenFTS (perl version) is available for testing
Previous Message Neil Conway 2002-02-14 18:37:43 Re: NAMEDATALEN Changes