privileges regression problem on freebsd/alpha

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: privileges regression problem on freebsd/alpha
Date: 2002-03-08 03:54:44
Message-ID: GNELIHDDFBOCMGBFGEFOCEKOCBAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Just tested latest CVS on my freebsd/alpha. Only one test failed, and
that's privileges related...

*** ./expected/privileges.out Thu Mar 7 09:53:51 2002
--- ./results/privileges.out Fri Mar 8 11:03:36 2002
***************
*** 201,218 ****
CREATE FUNCTION testfunc1(int) RETURNS int AS 'select 2 * $1;' LANGUAGE
sql;
CREATE FUNCTION testfunc2(int) RETURNS int AS 'select 3 * $1;' LANGUAGE
sql;
GRANT EXECUTE ON FUNCTION testfunc1(int), testfunc2(int) TO regressuser2;
GRANT USAGE ON FUNCTION testfunc1(int) TO regressuser3; -- semantic error
! ERROR: invalid privilege type USAGE for function object
GRANT ALL PRIVILEGES ON FUNCTION testfunc1(int) TO regressuser4;
GRANT ALL PRIVILEGES ON FUNCTION testfunc_nosuch(int) TO regressuser4;
! ERROR: Function 'testfunc_nosuch(int4)' does not exist
SET SESSION AUTHORIZATION regressuser2;
SELECT testfunc1(5), testfunc2(5); -- ok
! testfunc1 | testfunc2
! -----------+-----------
! 10 | 15
! (1 row)
!
CREATE FUNCTION testfunc3(int) RETURNS int AS 'select 2 * $1;' LANGUAGE
sql; -- fail
ERROR: permission denied
SET SESSION AUTHORIZATION regressuser3;
--- 201,216 ----
CREATE FUNCTION testfunc1(int) RETURNS int AS 'select 2 * $1;' LANGUAGE
sql;
CREATE FUNCTION testfunc2(int) RETURNS int AS 'select 3 * $1;' LANGUAGE
sql;
GRANT EXECUTE ON FUNCTION testfunc1(int), testfunc2(int) TO regressuser2;
+ ERROR: bogus GrantStmt.objtype 458
GRANT USAGE ON FUNCTION testfunc1(int) TO regressuser3; -- semantic error
! ERROR: bogus GrantStmt.objtype 458
GRANT ALL PRIVILEGES ON FUNCTION testfunc1(int) TO regressuser4;
+ ERROR: bogus GrantStmt.objtype 458
GRANT ALL PRIVILEGES ON FUNCTION testfunc_nosuch(int) TO regressuser4;
! ERROR: bogus GrantStmt.objtype 458
SET SESSION AUTHORIZATION regressuser2;
SELECT testfunc1(5), testfunc2(5); -- ok
! ERROR: permission denied
CREATE FUNCTION testfunc3(int) RETURNS int AS 'select 2 * $1;' LANGUAGE
sql; -- fail
ERROR: permission denied
SET SESSION AUTHORIZATION regressuser3;
***************
*** 220,230 ****
ERROR: permission denied
SET SESSION AUTHORIZATION regressuser4;
SELECT testfunc1(5); -- ok
! testfunc1
! -----------
! 10
! (1 row)
!
DROP FUNCTION testfunc1(int); -- fail
ERROR: RemoveFunction: function 'testfunc1': permission denied
\c -
--- 218,224 ----
ERROR: permission denied
SET SESSION AUTHORIZATION regressuser4;
SELECT testfunc1(5); -- ok
! ERROR: permission denied
DROP FUNCTION testfunc1(int); -- fail
ERROR: RemoveFunction: function 'testfunc1': permission denied
\c -

======================================================================

Attachment Content-Type Size
regression.diffs application/octet-stream 2.5 KB
regression.out application/octet-stream 3.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-03-08 04:02:51 Re: pg_class -> reltuples?
Previous Message Neil Conway 2002-03-08 03:44:11 bug in psql