Unix Technical Forum

cursors, current_user, and SECURITY DEFINER

This is a discussion on cursors, current_user, and SECURITY DEFINER within the pgsql Hackers forums, part of the PostgreSQL category; --> While replying to the "information_schema for all users" thread in pgsql-sql I noticed that a cursor returned from a ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 03:20 AM
Michael Fuhr
 
Posts: n/a
Default cursors, current_user, and SECURITY DEFINER

While replying to the "information_schema for all users" thread in
pgsql-sql I noticed that a cursor returned from a SECURITY DEFINER
function evalutes current_user as the user who executes FETCH, not
as the user who defined the function that opened the cursor. Here
are the question and my response, which contains an example:

http://archives.postgresql.org/pgsql...7/msg00137.php
http://archives.postgresql.org/pgsql...7/msg00140.php

I can understand that evaluating current_user at FETCH time makes
sense from an execution standpoint, but what user should it evaluate
to? In one sense current_user is the user who executed FETCH, but
since the cursor was opened with the function definer's privileges,
one might argue that the cursor's current_user ought to be the
function definer. Is the current behavior intentional? If so,
what's the rationale? If not, are there good reasons for doing it
one way or the other? I haven't considered the implications
thoroughly enough to have a position either way.

--
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com