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

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: Please test peer (socket ident) auth on *BSD
Date: 2011-05-31 22:30:56
Message-ID: BANLkTi=wHAqZF3PKoUuwfSVtQ=DpFcw=pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 1, 2011 at 1:03 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Marko Kreen <markokr(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2011-05-31 23:03:56 Re: creating CHECK constraints as NOT VALID
Previous Message Tom Lane 2011-05-31 22:14:58 Re: Retrieving variable names from ids in pl_exec.c