postgresql/src/backend/commands
Tom Lane 891e6e7bfd Require execute permission on the trigger function for CREATE TRIGGER.
This check was overlooked when we added function execute permissions to the
system years ago.  For an ordinary trigger function it's not a big deal,
since trigger functions execute with the permissions of the table owner,
so they couldn't do anything the user issuing the CREATE TRIGGER couldn't
have done anyway.  However, if a trigger function is SECURITY DEFINER,
that is not the case.  The lack of checking would allow another user to
install it on his own table and then invoke it with, essentially, forged
input data; which the trigger function is unlikely to realize, so it might
do something undesirable, for instance insert false entries in an audit log
table.

Reported by Dinesh Kumar, patch by Robert Haas

Security: CVE-2012-0866
2012-02-23 15:38:56 -05:00
..
Makefile Consolidate DROP handling for some object types. 2011-10-19 23:27:19 -04:00
aggregatecmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
alter.c Disallow ALTER DOMAIN on non-domain type everywhere 2012-01-27 21:20:34 +02:00
analyze.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
async.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
cluster.c Classify DROP operations by whether or not they are user-initiated. 2012-01-26 09:30:27 -05:00
collationcmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
comment.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
constraint.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
conversioncmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
copy.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
dbcommands.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
define.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
discard.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
dropcmds.c Classify DROP operations by whether or not they are user-initiated. 2012-01-26 09:30:27 -05:00
explain.c Make EXPLAIN (BUFFERS) track blocks dirtied, as well as those written. 2012-02-22 20:33:05 -05:00
extension.c Fix typo in comment. 2012-02-22 19:46:12 -05:00
foreigncmds.c Remove inappropriate quotes 2012-02-23 12:52:17 +02:00
functioncmds.c Allow LEAKPROOF functions for better performance of security views. 2012-02-13 22:21:14 -05:00
indexcmds.c Damage control for yesterday's CheckIndexCompatible changes. 2012-01-26 08:21:31 -05:00
lockcmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
opclasscmds.c Classify DROP operations by whether or not they are user-initiated. 2012-01-26 09:30:27 -05:00
operatorcmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
portalcmds.c Run a portal's cleanup hook immediately when pushing it to FAILED state. 2012-02-15 16:19:01 -05:00
prepare.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
proclang.c Allow LEAKPROOF functions for better performance of security views. 2012-02-13 22:21:14 -05:00
schemacmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
seclabel.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
sequence.c Fix transient clobbering of shared buffers during WAL replay. 2012-02-05 15:49:17 -05:00
tablecmds.c Be more clear when a new column name collides with a system column name. 2012-01-26 12:44:30 -05:00
tablespace.c Avoid throwing ERROR during WAL replay of DROP TABLESPACE. 2012-02-06 14:44:41 -05:00
trigger.c Require execute permission on the trigger function for CREATE TRIGGER. 2012-02-23 15:38:56 -05:00
tsearchcmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
typecmds.c Allow LEAKPROOF functions for better performance of security views. 2012-02-13 22:21:14 -05:00
user.c Make superuser imply replication privilege. The idea of a privilege that 2012-01-14 18:22:16 +02:00
vacuum.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
vacuumlazy.c Fix broken logic in lazy_vacuum_heap. 2012-01-13 08:22:31 -05:00
variable.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
view.c Fix warning about unused variable 2012-01-18 10:24:15 +01:00