Re: Remove one use of IDENT_USERNAME_MAX

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Remove one use of IDENT_USERNAME_MAX
Дата
Msg-id eedd3c43-ed87-3c84-de36-07a83ca94265@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Remove one use of IDENT_USERNAME_MAX  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Remove one use of IDENT_USERNAME_MAX
Список pgsql-hackers
On 2019-10-28 14:45, Tom Lane wrote:
> Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
>> At Sat, 26 Oct 2019 08:55:03 +0200, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote in
>>> IDENT_USERNAME_MAX is the maximum length of the information returned
>>> by an ident server, per RFC 1413.  Using it as the buffer size in peer
>>> authentication is inappropriate.  It was done here because of the
>>> historical relationship between peer and ident authentication.  But
>>> since it's also completely useless code-wise, remove it.
> 
>> In think one of the reasons for the coding is the fact that *pw is
>> described to be placed in the static area, which can be overwritten by
>> succeeding calls to getpw*() functions.
> 
> Good point ... so maybe pstrdup instead of using a fixed-size buffer?

Maybe.  Or we just decide that check_usermap() is not allowed to call 
getpw*().  It's just a string-matching routine, so it doesn't have any 
such business anyway.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: [Proposal] Global temporary tables