Re: per user/database connections limit again

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: per user/database connections limit again
Дата
Msg-id 20050702235546.GK24207@ns.snowman.net
обсуждение исходный текст
Ответ на per user/database connections limit again  (Petr Jelinek <pjmodos@parba.cz>)
Ответы Re: per user/database connections limit again
Список pgsql-patches
* Petr Jelinek (pjmodos@parba.cz) wrote:
> +     if (!(superuser()
> +         || ((Form_pg_database) GETSTRUCT(tuple))->datdba == GetUserId()))
> +         aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_DATABASE,
> +                        stmt->dbname);

This should almost certainly be a pg_database_ownercheck() call instead.

The rest needs to be updated for roles, but looks like it should be
pretty easy to do.  Much of it just needs to be repatched, the parts
that do need to be changed look to be pretty simple changes.

I believe the use of SessionUserId is probably correct in this patch.
This does mean that this patch will only be for canlogin roles, but that
seems like it's probably correct.  Handling roles w/ members would
require much more thought.

    Thanks,

        Stephen

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Dbsize backend integration
Следующее
От: Michael Fuhr
Дата:
Сообщение: contrib/pgcrypto patch for OpenSSL 0.9.8