pgsql: Make inherited LOCK TABLE perform access permission checks on pa

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема pgsql: Make inherited LOCK TABLE perform access permission checks on pa
Дата
Msg-id E1j3uIE-0006xn-0w@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Make inherited LOCK TABLE perform access permission checks on parent table only.

Previously, LOCK TABLE command through a parent table checked
the permissions on not only the parent table but also the children
tables inherited from it. This was a bug and inherited queries should
perform access permission checks on the parent table only. This
commit fixes LOCK TABLE so that it does not check the permission
on children tables.

This patch is applied only in the master branch. We decided not to
back-patch because it's not hard to imagine that there are some
applications expecting the old behavior and the change breaks their
security.

Author: Amit Langote
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/CAHGQGwE+GauyG7POtRfRwwthAGwTjPQYdFHR97+LzA4RHGnJxA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b7e51b350c4e6b1cb3404588cf11801525e2336f

Modified Files
--------------
src/backend/commands/lockcmds.c          | 33 +++++++++++---------------------
src/test/regress/expected/lock.out       | 10 +++++++---
src/test/regress/expected/privileges.out |  7 +++++++
src/test/regress/sql/lock.sql            |  8 ++++++--
src/test/regress/sql/privileges.sql      |  6 ++++++
5 files changed, 37 insertions(+), 27 deletions(-)


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Remove duplicated words in comments
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: pgsql: Logical Tape Set: lazily allocate read buffer.