Fix for OWNER TO breaking ACLs

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Fix for OWNER TO breaking ACLs
Date: 2004-07-30 02:14:46
Message-ID: 4109AF16.2020407@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Attached is a patch that fixes the owner change command on objects that
have privileges.

It probably needs a once over review since it involves a decent amount
of pointer arithmetic.

Note that languages don't have owners, and hence don't need fixing.

The owner change acl support is as follows:

1. If the acl is currently null, then don't do anything with the acl

2. If it is non null, then call aclnewowner() to get a new acl

3. aclnewowner() first looks for a grantee that is the new owner already
and remembers this item

4. A new acl is generated as a copy of the old acl, exlcuding the item
above if it exists. During the copy, any grantors or grantees in the
new acl that refer to the old owner are changed to refer to the new owner.

5. The excluded acl item's rights (if it existed) are merged with those
of the old owner and become the new owner's rights.

Chris

Attachment Content-Type Size
newowner.txt.gz application/x-gzip 3.8 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Zhenbang Wei 2004-07-30 02:22:58 Traditional Chinese initdb-zh_TW.po for 7.5
Previous Message Andreas Pflug 2004-07-29 20:03:03 Re: Admin functions contrib