Thread: grant broken

grant broken

From
Peter T Mount
Date:
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


Re: [HACKERS] grant broken

From
Bruce Momjian
Date:
>
> 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

Re: [HACKERS] grant broken

From
Peter T Mount
Date:
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


Re: [HACKERS] grant broken

From
Bruce Momjian
Date:
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

Re: [HACKERS] grant broken

From
Peter T Mount
Date:
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


Re: [HACKERS] grant broken

From
Bruce Momjian
Date:
>
> 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

Re: [HACKERS] grant broken

From
Peter T Mount
Date:
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


Re: [HACKERS] grant broken

From
"Thomas G. Lockhart"
Date:
> > 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


Re: [HACKERS] grant broken

From
Peter T Mount
Date:
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