Re: bug in permission handling? - Mailing list pgsql-hackers

From Gavin Sherry
Subject Re: bug in permission handling?
Date
Msg-id Pine.LNX.4.21.0201261607270.18126-100000@linuxworld.com.au
Whole thread Raw
In response to Re: bug in permission handling?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: bug in permission handling?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 14 Jan 2002, Peter Eisentraut wrote:

> Matthew T. O'Connor writes:
> 
> > I think that extranious permissions whether they are misassgned to a new
> > user, or not assigned to anyone are a bad thing.
> 
> Well, Unix systems have been working like that for decades and no one has
> come up with a bright idea how to fix it.

Sorry to bring this up again a few weeks later. It occurs to me that this
really isn't an answer. When adding a new user to a UNIX system, the
relevant command would have *at least* to scan the entire file system to
determine if the max(uid + 1) (from /etc/passwd) owned anything. This is
unreasonable. 

In the case of postgres, however, all objects in the system are
necessarily registered in the system tables. One could easily determine a
sysid which owns no objects by scanning the attributes of those relations
which reference objects in the system -- pg_aggregate.aggowner,
pg_class.relowner, etc -- and add one to the maximum sysid found.

I was going to run up a patch for this, but it wold be premature given
the introduction of schemas in 7.3. Once implemented, it would be trivial
to add a test of schema ownership and incorporate this into the idea
above.

Gavin



pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: RFD: schemas and different kinds of Postgres objects
Next
From: Tom Lane
Date:
Subject: Re: bug in permission handling?