Re: A little RLS oversight?
От | Joe Conway |
---|---|
Тема | Re: A little RLS oversight? |
Дата | |
Msg-id | 55B6E69D.7000104@joeconway.com обсуждение исходный текст |
Ответ на | Re: A little RLS oversight? (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: A little RLS oversight?
|
Список | pgsql-hackers |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/27/2015 03:05 PM, Stephen Frost wrote: > AFK at the moment, but my thinking was that we should avoid having > the error message change based on what a GUC is set to. I agree > that there should be comments which explain that. I changed back to using GetUserId() for the call to check_enable_rls() at those three call sites, and added to the comments to explain why. While looking at ri_ReportViolation() I spotted what I believe to be a bug in the current logic -- namely, has_perm is initialized to true, and when check_enable_rls() returns RLS_ENABLED we never reset has_perm to false, and thus leak info even though the comments claim we don't. I fixed that here, but someone please take a look and confirm I am reading that correctly. Beyond that, any additional comments? Thanks, Joe - -- Joe Conway -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJVtuadAAoJEDfy90M199hl67kQAJw9iekYVAm52+kOxmBi8YLK NMoRUWLv5AZ7coaltQBBTiYYbjWHVKoWaMrOg2OjtxjyeshYaZ+xsBQl4umznI9j b2unSfUmRPcCgy7O6R63+IXePh6krKowlMAIkSelYjvV05nSgQfy87/xjcBXS12r MajLambTyJycS8fQXdt9sG8uGZh7ncXUtip3mUOYgl9Omn5GiDcgbdV1xQR+GBRJ 48S9lTHIJenpvi83Y9/7CXfDwxdcvkziUkR67UL4jxqmjWBDrrGZWEWOE1KOn78W dIvItOnuw/tKoxmhcwkgys+u92uhfQUUwhDQsJRVKsqzvPcVt6Oh15rtlqipbYEn YfcM35Sa4sUtxL9JIoyof+8audagPy9nzD26c4jA2A7EWXHt8Dim/z7D5RgrOpdn xBqlwViuR5Zt+kLynf3aZyDtmaMIRA+tvzJPam1vrl7g86LCJbZslFNktveiGeYl 17+PKLTDcVO5f6CdT1NTnlaks0J7D4VThxGemDs09KX6P8iCe6VFaUqfEONpjb41 WsumlDJkT9bu5i8W68xtEskXBYgBmDCo6yho4bKn/f6tpHc10yyh8RpK48P5xPt9 ZLSTLmYkfLL7wsINw6eNrQ4OZCtWwiydD9CmjQZOzscyBBusOvlIcI9Kfrle0I1V r2gQN651WyY4YJIoEggu =hlUr -----END PGP SIGNATURE-----
Вложения
В списке pgsql-hackers по дате отправления: