| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] Inconsistent syntax in GRANT |
| Дата | |
| Msg-id | 23680.1136590603@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [HACKERS] Inconsistent syntax in GRANT (Josh Berkus <josh@agliodbs.com>) |
| Список | pgsql-patches |
Josh Berkus <josh@agliodbs.com> writes:
>> BTW, what about lastval()?
> Overal, it's hard to get too concerned about this, since a user can't
> really get anything out of lastval() if he doesn't have permissions on the
> sequence he's trying to query, in order to run currval.
Well, no, consider my example to Marko: there could be a SECURITY
DEFINER function that has the privilege to run nextval(). After
that, if lastval() isn't privilege-checked then code that doesn't
have any privilege at all on the sequence could get at the value.
However, looking at the source code I see that lastval() does in fact
insist on SELECT rights on the sequence the value is coming from.
So I guess we can just leave that as-is.
regards, tom lane
В списке pgsql-patches по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера