CATALOG/NOCATALOG for new users

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема CATALOG/NOCATALOG for new users
Дата
Msg-id 20031224204157.D50432-200000@houston.familyhealth.com.au
обсуждение исходный текст
Ответы Re: CATALOG/NOCATALOG for new users
Список pgsql-patches
This is a preliminary patch - don't commit it.

What this patch adds are the CATALOG and NOCATALOG clauses to the CREATE
USER and ALTER USER commands.

These clauses affect the usecatupd column.  This makes it easy to create
superusers who cannot manually modify columns (a very nasty power...)

These days, Postgres's built-in command set can do everything you need to
to (except disable triggers and delete all the users...), so I don't see
why people who have the power to create users should also have the power
to munge your entire db server.

There are a few problems that need thinking about, and I would like
comments on how to address them:

1. Should we only allow users who currently hold the catalog perm to grant
it to others?  I think yes, since otherwise a regular superuser can create
themselves another account with the catalog priv.

2. Restoring a dump (or dumpall more specifically perhaps) now requires
that the restoring user is more than just a superuser, they must also hold
the catalog priv.  This is why:

DELETE FROM pg_shadow WHERE usesysid <> (SELECT datdba FROM pg_database
WHERE datname = 'template0');

And also this:

-X disable-triggers

3. Upgrading from previous postgres will not give their old superusers
back their catalog privilege, unless they dump with 7.5's pg_dump.

Comments?

Chris

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Doc patch--clarifying $1 in PL/PgSQL
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: Doc patch--clarifying $1 in PL/PgSQL