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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Ron Snyder <snyder(at)roguewave(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Default privileges for new databases (was Re: Can't import large objects in most recent cvs)
Date: 2002-08-27 00:14:09
Message-ID: 10893.1030407249@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-27 02:27:49 Re: Default privileges for new databases (was Re: Can't import
Previous Message Nigel J. Andrews 2002-08-26 22:58:00 Re: [HACKERS] TODO Done. Superuser backend slot reservations