Fix for OWNER TO breaking ACLs

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Fix for OWNER TO breaking ACLs
Дата
Msg-id 4109AF16.2020407@familyhealth.com.au
обсуждение исходный текст
Ответы Re: Fix for OWNER TO breaking ACLs  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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


Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: Admin functions contrib
Следующее
От: Zhenbang Wei
Дата:
Сообщение: Traditional Chinese initdb-zh_TW.po for 7.5