| From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | amul sul <sulamul(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Failed assertion due to procedure created with SECURITY DEFINER option |
| Date: | 2018-07-04 07:43:06 |
| Message-ID: | 72ba1903-4c79-653d-432c-8139137b773d@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 03.07.18 19:20, Andres Freund wrote:
> On 2018-06-29 10:19:17 -0700, Andres Freund wrote:
>> Hi,
>>
>> On 2018-06-29 13:56:12 +0200, Peter Eisentraut wrote:
>>> On 6/29/18 13:07, amul sul wrote:
>>>> This happens because of in fmgr_security_definer() function we are
>>>> changing global variable SecurityRestrictionContext and in the
>>>> StartTransaction() insisting it should be zero, which is the problem.
>>>
>>> Hmm, what is the reason for this insistation?
>>
>> Because it's supposed to be reset by AbortTransaction(), after an error.
>
> Does that make sense Peter?
>
> I've added this thread to the open items list.
Proposed fix attached.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Prohibit-transaction-commands-in-security-definer-pr.patch | text/plain | 3.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2018-07-04 07:46:58 | Re: Test-cases for deferred constraints in plpgsql_transaction.sql |
| Previous Message | Ideriha, Takeshi | 2018-07-04 07:23:19 | RE: Global shared meta cache |