Re: Preventing non-superusers from altering session authorization

Поиск
Список
Период
Сортировка
Искать
От
Nathan Bossart
Тема
Re: Preventing non-superusers from altering session authorization
Дата
Msg-id
20230622034818.GA1077640@nathanxps13
Ответ на
Список
Дерево обсуждения
Preventing non-superusers from altering session authorization Joseph Koshakow <koshy44@gmail.com>
Re: Preventing non-superusers from altering session authorization Nathan Bossart <nathandbossart@gmail.com>
Re: Preventing non-superusers from altering session authorization Nathan Bossart <nathandbossart@gmail.com>
Re: Preventing non-superusers from altering session authorization Joseph Koshakow <koshy44@gmail.com>
Re: Preventing non-superusers from altering session authorization Nathan Bossart <nathandbossart@gmail.com>
Re: Preventing non-superusers from altering session authorization Joseph Koshakow <koshy44@gmail.com>
Re: Preventing non-superusers from altering session authorization Joseph Koshakow <koshy44@gmail.com>
Re: Preventing non-superusers from altering session authorization Joseph Koshakow <koshy44@gmail.com>
Re: Preventing non-superusers from altering session authorization Nathan Bossart <nathandbossart@gmail.com>
Re: Preventing non-superusers from altering session authorization Joseph Koshakow <koshy44@gmail.com>
Re: Preventing non-superusers from altering session authorization Nathan Bossart <nathandbossart@gmail.com>
Re: Preventing non-superusers from altering session authorization Joseph Koshakow <koshy44@gmail.com>
Re: Preventing non-superusers from altering session authorization Joseph Koshakow <koshy44@gmail.com>
Re: Preventing non-superusers from altering session authorization Nathan Bossart <nathandbossart@gmail.com>
Re: Preventing non-superusers from altering session authorization Joseph Koshakow <koshy44@gmail.com>
Re: Preventing non-superusers from altering session authorization Nathan Bossart <nathandbossart@gmail.com>
Re: Preventing non-superusers from altering session authorization Nathan Bossart <nathandbossart@gmail.com>
Re: Preventing non-superusers from altering session authorization Nathan Bossart <nathandbossart@gmail.com>
Re: Preventing non-superusers from altering session authorization Michał Kłeczek <michal@kleczek.org>
On Wed, Jun 21, 2023 at 04:28:43PM -0400, Joseph Koshakow wrote:
> +	roleTup = SearchSysCache1(AUTHOID, ObjectIdGetDatum(AuthenticatedUserId));
> +	if (!HeapTupleIsValid(roleTup))
> +		ereport(FATAL,
> +				(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
> +						errmsg("role with OID %u does not exist", AuthenticatedUserId)));
> +	rform = (Form_pg_authid) GETSTRUCT(roleTup);

I think "superuser_arg(AuthenticatedUserId)" would work here.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com


В списке pgsql-hackers по дате отправления
От: Amit Kapila
Дата:
От: shveta malik
Дата:
FAQ