ALTER DOMAIN .. OWNER TO ..

Lists: pgsql-patches
From: Rod Taylor <rbt(at)rbt(dot)ca>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: ALTER DOMAIN .. OWNER TO ..
Date: 2002-12-09 02:19:30
Message-ID: 1039400370.79804.198.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Allow change of ownership in a domain.

Either a superuser or owner of the schema may change the owner of the
domain.

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachment Content-Type Size
altdomainowner.patch text/plain 6.6 KB

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Rod Taylor" <rbt(at)rbt(dot)ca>, "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ALTER DOMAIN .. OWNER TO ..
Date: 2002-12-09 03:30:54
Message-ID: 008a01c29f33$61e2b0b0$6500a8c0@internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

What about the owner of the schema?

Chris

----- Original Message -----
From: "Rod Taylor" <rbt(at)rbt(dot)ca>
To: "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
Sent: Sunday, December 08, 2002 6:19 PM
Subject: [PATCHES] ALTER DOMAIN .. OWNER TO ..

Allow change of ownership in a domain.

Either a superuser or owner of the schema may change the owner of the
domain.

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc


From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Rod Taylor" <rbt(at)rbt(dot)ca>, "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ALTER DOMAIN .. OWNER TO ..
Date: 2002-12-09 03:31:06
Message-ID: 009001c29f33$68adbc00$6500a8c0@internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

DOH! I mean, what about the owner of the domain? :)

Chris

----- Original Message -----
From: "Rod Taylor" <rbt(at)rbt(dot)ca>
To: "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
Sent: Sunday, December 08, 2002 6:19 PM
Subject: [PATCHES] ALTER DOMAIN .. OWNER TO ..

Allow change of ownership in a domain.

Either a superuser or owner of the schema may change the owner of the
domain.

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc


From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ALTER DOMAIN .. OWNER TO ..
Date: 2002-12-09 03:32:52
Message-ID: 1039404771.79804.214.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Sun, 2002-12-08 at 22:31, Christopher Kings-Lynne wrote:
> DOH! I mean, what about the owner of the domain? :)

Alter table doesn't even allow the owner of the schema to change the
table owner.

Anyway... Unix has never allowed you to give away your own stuff to
others on the filesystem. I'm sure there is a good reason for that :)

> ----- Original Message -----
> From: "Rod Taylor" <rbt(at)rbt(dot)ca>
> To: "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
> Sent: Sunday, December 08, 2002 6:19 PM
> Subject: [PATCHES] ALTER DOMAIN .. OWNER TO ..
>
>
> Allow change of ownership in a domain.
>
> Either a superuser or owner of the schema may change the owner of the
> domain.
--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ALTER DOMAIN .. OWNER TO ..
Date: 2002-12-09 14:59:46
Message-ID: 7608.1039445986@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Rod Taylor <rbt(at)rbt(dot)ca> writes:
> Either a superuser or owner of the schema may change the owner of the
> domain.

Superuser only, please. Or are you not familiar with the reasons why
most Unixen do not allow one to "give away" ownership of a file?

regards, tom lane


From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ALTER DOMAIN .. OWNER TO ..
Date: 2002-12-09 15:28:16
Message-ID: 1039447696.78462.21.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Mon, 2002-12-09 at 09:59, Tom Lane wrote:
> Rod Taylor <rbt(at)rbt(dot)ca> writes:
> > Either a superuser or owner of the schema may change the owner of the
> > domain.
>
> Superuser only, please. Or are you not familiar with the reasons why
> most Unixen do not allow one to "give away" ownership of a file?

Not schema owner?

Isn't the schema owner considered a 'superuser' of their own area?

The two reasons I know of are 1) quotas, and 2) people breaking in
hiding their work.

We don't have quotas, and if the schema owner is 'super user' in their
area, then they'll always be able to find it -- though I can understand
not allowing change of owner on the schema by the schema owner (database
owner and super users only...).

Anyway, I'll submit the change for it to be superuser only -- and will
debate that the database owner should be superuser for their database
later.

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc


From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ALTER DOMAIN .. OWNER TO ..
Date: 2002-12-09 15:48:16
Message-ID: 1039448896.78462.23.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Only superuser may change ownership...

On Mon, 2002-12-09 at 09:59, Tom Lane wrote:
> Rod Taylor <rbt(at)rbt(dot)ca> writes:
> > Either a superuser or owner of the schema may change the owner of the
> > domain.
>
> Superuser only, please. Or are you not familiar with the reasons why
> most Unixen do not allow one to "give away" ownership of a file?
>
> regards, tom lane
--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachment Content-Type Size
alterdomainowner.patch text/plain 13.3 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ALTER DOMAIN .. OWNER TO ..
Date: 2002-12-09 15:51:16
Message-ID: 8053.1039449076@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Rod Taylor <rbt(at)rbt(dot)ca> writes:
> On Mon, 2002-12-09 at 09:59, Tom Lane wrote:
>> Superuser only, please. Or are you not familiar with the reasons why
>> most Unixen do not allow one to "give away" ownership of a file?

> Not schema owner?
> Isn't the schema owner considered a 'superuser' of their own area?

No. The schema owner has the right to drop an item in their schema (and
maybe to rename it, I forget) but not the right to alter its properties.
This is exactly analogous to what a Unix directory owner can do to a
contained file he doesn't own.

> The two reasons I know of are 1) quotas, and 2) people breaking in
> hiding their work.

Try "3), without it, filesystem security is a joke". Consider
echo "rm -rf ~joe" >badscript
chmod u+sx badscript
chown joe badscript
./badscript

PG would be vulnerable to similar sorts of attacks if we allowed giving
away function ownership. Domains might be too simple to support such
attacks ... at the moment. I don't want to bet that they'll always be
so.

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ALTER DOMAIN .. OWNER TO ..
Date: 2002-12-11 03:46:53
Message-ID: 200212110346.gBB3ksM19746@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Rod Taylor wrote:
-- Start of PGP signed section.
> Only superuser may change ownership...
>
> On Mon, 2002-12-09 at 09:59, Tom Lane wrote:
> > Rod Taylor <rbt(at)rbt(dot)ca> writes:
> > > Either a superuser or owner of the schema may change the owner of the
> > > domain.
> >
> > Superuser only, please. Or are you not familiar with the reasons why
> > most Unixen do not allow one to "give away" ownership of a file?
> >
> > regards, tom lane
> --
> Rod Taylor <rbt(at)rbt(dot)ca>
>
> PGP Key: http://www.rbt.ca/rbtpub.asc

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073