postgresql/src
Dean Rasheed 1b9a2f458b Perform RLS subquery checks as the right user when going via a view.
When accessing a table with RLS via a view, the RLS checks are
performed as the view owner. However, the code neglected to propagate
that to any subqueries in the RLS checks. Fix that by calling
setRuleCheckAsUser() for all RLS policy quals and withCheckOption
checks for RTEs with RLS.

Back-patch to 9.5 where RLS was added.

Per bug #15708 from daurnimator.

Discussion: https://postgr.es/m/15708-d65cab2ce9b1717a@postgresql.org
2019-04-02 08:20:55 +01:00
..
backend Perform RLS subquery checks as the right user when going via a view. 2019-04-02 08:20:55 +01:00
bin Have pg_upgrade's Makefile honor NO_TEMP_INSTALL 2019-03-31 08:22:04 -04:00
common Fix portability failure introduced in commits d2b0b60e7 et al. 2018-12-26 15:30:30 -05:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Track unowned relations in doubly-linked list 2019-03-27 03:20:10 +01:00
interfaces Fix potential memory access violation in ecpg if filename of include file is 2019-03-11 16:26:59 +01:00
makefiles Move port-specific parts of with_temp_install to port makefile. 2019-02-04 18:59:44 +00:00
pl Translation updates 2019-02-11 14:21:55 +01:00
port Fix error handling of readdir() port implementation on first file lookup 2019-03-04 09:50:14 +09:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Perform RLS subquery checks as the right user when going via a view. 2019-04-02 08:20:55 +01:00
timezone Update time zone data files to tzdata release 2018i. 2019-02-05 10:59:23 -05:00
tools Unify searchpath and do file logic in MSVC build scripts. 2019-02-06 07:53:19 -05:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Move port-specific parts of with_temp_install to port makefile. 2019-02-04 18:59:44 +00:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00