Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-22 Thread KaiGai Kohei
(2010/03/20 13:37), Tom Lane wrote: > KaiGai Kohei writes: >> Is it an expected behavior that PostgreSQL tries to execute foo() with >> privileges of the owner of language call handler because of its security >> definer property? This server crash is just a result. > > A language call handler has

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Tom Lane
KaiGai Kohei writes: > Is it an expected behavior that PostgreSQL tries to execute foo() with > privileges of the owner of language call handler because of its security > definer property? This server crash is just a result. A language call handler has no function properties of its own --- which

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Robert Haas
On Fri, Mar 19, 2010 at 10:29 PM, KaiGai Kohei wrote: > Is it an expected behavior that PostgreSQL tries to execute foo() with > privileges of the owner of language call handler because of its security > definer property? This server crash is just a result. I'm inclined to feel (and Tom's respons

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Josh Berkus
On 3/19/10 5:18 AM, Tom Lane wrote: >> When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), >> > it makes server process crashed. > > So don't do that. Whatever possessed you to think that's a sensible > idea anyway? PATIENT: Doctor, it hurts when I do this! DOCTOR: So stop do

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread KaiGai Kohei
(2010/03/20 11:17), Robert Haas wrote: On Fri, Mar 19, 2010 at 8:11 PM, Tom Lane wrote: Robert Haas writes: On Fri, Mar 19, 2010 at 8:18 AM, Tom Lane wrote: KaiGai Kohei writes: When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), it makes server process crashed. So do

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Robert Haas
On Fri, Mar 19, 2010 at 8:11 PM, Tom Lane wrote: > Robert Haas writes: >> On Fri, Mar 19, 2010 at 8:18 AM, Tom Lane wrote: >>> KaiGai Kohei writes: When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), it makes server process crashed. >>> >>> So don't do that.  Whatev

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Tom Lane
Robert Haas writes: > On Fri, Mar 19, 2010 at 8:18 AM, Tom Lane wrote: >> KaiGai Kohei writes: >>> When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), >>> it makes server process crashed. >> >> So don't do that.  Whatever possessed you to think that's a sensible >> idea anywa

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Robert Haas
On Fri, Mar 19, 2010 at 8:18 AM, Tom Lane wrote: > KaiGai Kohei writes: >> When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), >> it makes server process crashed. > > So don't do that.  Whatever possessed you to think that's a sensible > idea anyway? It might not be sensible,

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Tom Lane
KaiGai Kohei writes: > When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), > it makes server process crashed. So don't do that. Whatever possessed you to think that's a sensible idea anyway? regards, tom lane -- Sent via pgsql-hackers mailing list (p

[HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread KaiGai Kohei
It is a bug report in a corner case. When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), it makes server process crashed. postgres=# ALTER FUNCTION plpgsql_call_handler() security definer; ALTER FUNCTION postgres=# CREATE FUNCTION foo(text) RETURNS text AS $$ BEGIN R