Re: Please test peer (socket ident) auth on *BSD

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема Re: Please test peer (socket ident) auth on *BSD
Дата
Msg-id BANLkTi=wHAqZF3PKoUuwfSVtQ=DpFcw=pw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Please test peer (socket ident) auth on *BSD  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Jun 1, 2011 at 1:03 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Marko Kreen <markokr@gmail.com> writes:
>> My suggestion would be to use getpeereid() everywhere.
>> And just have compat getpeereid() implementation on non-BSD
>> platforms.  This would minimize ifdeffery in core core.
>
> Hm, maybe.  I'd be for this if we had more than two call sites, but
> as things stand I'm not sure it's worth the trouble to set up a src/port
> module for it.

It would remove ~50 lines of low-level code from otherwise
high-level function.  So even with one call site it would be improvement.

If the src/port is trouble, how about putting it as 'static inline' into .h?  :)

--
marko


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fix for GiST penalty
Следующее
От: Greg Stark
Дата:
Сообщение: Re: creating CHECK constraints as NOT VALID