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.


Attachment: newowner.txt.gz
Description: GNU Zip compressed data

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to