Re: Default privileges for new databases (was Re: Can't import large objects in most recent cvs) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Default privileges for new databases (was Re: Can't import large objects in most recent cvs)
Date
Msg-id 10893.1030407249@sss.pgh.pa.us
Whole thread Raw
In response to Re: Default privileges for new databases (was Re: Can't import  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Default privileges for new databases (was Re: Can't import
Re: Default privileges for new databases (was Re: Can't import
Re: Default privileges for new databases (was Re: Can't import
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Have we addressed this?  I don't think so.

No, it's not done yet.  My inclination is

* Template1 has temp table creation and schema creation disabled
(disallowed to world) by default.

* CREATE DATABASE sets up new databases with temp table creation allowed
to world and schema creation allowed to DB owner only (regardless of
what the template database had).  The owner can adjust this default
afterwards if he doesn't like it.

It would be nice to lock down the public schema in template1 too, but I
see no good way to do that, because CREATE DATABASE can't readily fiddle
with protections *inside* the database --- the only games we can play
are with the protections stored in the pg_database row itself.  So
public's permissions are going to be inherited from the template
database, and that means template1's public has to be writable.

Objections anyone?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: TODO Done. Superuser backend slot reservations
Next
From: Bruce Momjian
Date:
Subject: Re: Default privileges for new databases (was Re: Can't import