grant broken

Started by Peter T Mountabout 28 years ago10 messages
#1Peter T Mount
psqlhack@maidast.demon.co.uk

While implementing a method to retrieve the permissions on a table,
the statement: "grant all on test to public;" kills the backend.

--
Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk

#2Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Peter T Mount (#1)
Re: [HACKERS] grant broken

While implementing a method to retrieve the permissions on a table,
the statement: "grant all on test to public;" kills the backend.

Works here.

--
Bruce Momjian
maillist@candle.pha.pa.us

#3Peter T Mount
psqlhack@maidast.demon.co.uk
In reply to: Bruce Momjian (#2)
Re: [HACKERS] grant broken

On Thu, 8 Jan 1998, Bruce Momjian wrote:

While implementing a method to retrieve the permissions on a table,
the statement: "grant all on test to public;" kills the backend.

Works here.

I've just resynced with cvs, rebuilt from scratch and still:

test=> \z

Database    = test
 +------------------+----------------------------------------------------+
 |  Relation        |             Grant/Revoke Permissions               |
 +------------------+----------------------------------------------------+
 | test             |                                                    | 
 +------------------+----------------------------------------------------+
test=> grant all on test to pmount;
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
        This probably means the backend terminated abnormally before or
while processing the request.

This happens both with and without the large object patch, so that's ruled
out.

Platform: Linux 2.0.27

--
Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk

#4Zeugswetter Andreas DBT
Andreas.Zeugswetter@telecom.at
In reply to: Peter T Mount (#3)
Re: [HACKERS] grant broken

While implementing a method to retrieve the permissions on a table,
the statement: "grant all on test to public;" kills the backend.

Works here.

Don't work here either:
(dbx) where
OrderedElemPop(elem = 0x2008b4c8), line 130 in "oset.c"
AllocSetFree(0x2008b1c8, 0x2008b4d8), line 226 in "aset.c"
AllocSetReset(0x2008b1c8), line 134 in "aset.c"
EndPortalAllocMode(), line 914 in "portalmem.c"
AtCommit_Memory(), line 688 in "xact.c"
CommitTransaction(), line 899 in "xact.c"
CommitTransactionCommand(), line 1084 in "xact.c"
PostgresMain(0xa, 0x2ff22aa0), line 1600 in "postgres.c"
main(argc = 10, argv = 0x2ff22aa0), line 79 in "main.c"

(invalid char ptr (0x2008b4d8))), line 226 in "aset.c"

Andreas

#5Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Peter T Mount (#3)
Re: [HACKERS] grant broken

How about a new initdb?

On Thu, 8 Jan 1998, Bruce Momjian wrote:

While implementing a method to retrieve the permissions on a table,
the statement: "grant all on test to public;" kills the backend.

Works here.

I've just resynced with cvs, rebuilt from scratch and still:

test=> \z

Database    = test
+------------------+----------------------------------------------------+
|  Relation        |             Grant/Revoke Permissions               |
+------------------+----------------------------------------------------+
| test             |                                                    | 
+------------------+----------------------------------------------------+
test=> grant all on test to pmount;
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
This probably means the backend terminated abnormally before or
while processing the request.

This happens both with and without the large object patch, so that's ruled
out.

Platform: Linux 2.0.27

--
Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk

--
Bruce Momjian
maillist@candle.pha.pa.us

#6Peter T Mount
psqlhack@maidast.demon.co.uk
In reply to: Bruce Momjian (#5)
Re: [HACKERS] grant broken

On Fri, 9 Jan 1998, Bruce Momjian wrote:

How about a new initdb?

That was the first thing I tried. When that didn't work, I removed the
entire distribution, resynced the source with cvs, and recompiled.

When checking that the large object fix wasn't to blame, I did a fresh
initdb again before testing.

--
Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk

#7Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Peter T Mount (#6)
Re: [HACKERS] grant broken

On Fri, 9 Jan 1998, Bruce Momjian wrote:

How about a new initdb?

That was the first thing I tried. When that didn't work, I removed the
entire distribution, resynced the source with cvs, and recompiled.

When checking that the large object fix wasn't to blame, I did a fresh
initdb again before testing.

Can you give me a test case? Is it \z on an empty database, or does a
table have to have a specific permissoin?

---------------------------------------------------------------------------

test=> \z

Database    = test
 +------------------+----------------------------------------------------+
 |  Relation        |             Grant/Revoke Permissions               |
 +------------------+----------------------------------------------------+
 | test             | {"=arwR","wilson=arwR"}                            | 
 | test2            |                                                    | 
 | test3            |                                                    | 
 | test4            |                                                    | 

--
Bruce Momjian
maillist@candle.pha.pa.us

#8Peter T Mount
psqlhack@maidast.demon.co.uk
In reply to: Bruce Momjian (#7)
Re: [HACKERS] grant broken

On Fri, 9 Jan 1998, Bruce Momjian wrote:

On Fri, 9 Jan 1998, Bruce Momjian wrote:

How about a new initdb?

That was the first thing I tried. When that didn't work, I removed the
entire distribution, resynced the source with cvs, and recompiled.

When checking that the large object fix wasn't to blame, I did a fresh
initdb again before testing.

Can you give me a test case? Is it \z on an empty database, or does a
table have to have a specific permissoin?

It's a test database, with a single table in it, and two users (the DBA,
and a normal user).

One of the methods in JDBC's DatabaseMetaData returns details about the
rights granted on the database, so to test the method, I was setting up
the normal user with update rights to the table, so I had something to
work on.

The backend simply dies when ever the grant statement is entered
correctly.

--
Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk

#9Thomas G. Lockhart
lockhart@alumni.caltech.edu
In reply to: Peter T Mount (#8)
Re: [HACKERS] grant broken

Can you give me a test case? Is it \z on an empty database, or does a
table have to have a specific permissoin?

It's a test database, with a single table in it, and two users (the DBA,
and a normal user).

One of the methods in JDBC's DatabaseMetaData returns details about the
rights granted on the database, so to test the method, I was setting up
the normal user with update rights to the table, so I had something to
work on.

The backend simply dies when ever the grant statement is entered
correctly.

If I understood the test case you published, you are specifying to the grant
command the database "test", not a table within the database. The man page for
grant is not very specific, but is this supposed to work?

- Tom

#10Peter T Mount
psqlhack@maidast.demon.co.uk
In reply to: Thomas G. Lockhart (#9)
Re: [HACKERS] grant broken

On Sat, 10 Jan 1998, Thomas G. Lockhart wrote:

If I understood the test case you published, you are specifying to the grant
command the database "test", not a table within the database. The man page for
grant is not very specific, but is this supposed to work?

No, there is a table called test, that I'm granting permissions to. The
database is also called test.

Could grant be confusing the two?

--
Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk