Re: Please test peer (socket ident) auth on *BSD - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Please test peer (socket ident) auth on *BSD
Date
Msg-id 1306870688.20912.2.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: Please test peer (socket ident) auth on *BSD  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Please test peer (socket ident) auth on *BSD  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
On tis, 2011-05-31 at 11:59 -0400, Tom Lane wrote:
> However, FreeBSD does have, and Debian/kFreeBSD does expose,
> getsockopt(LOCAL_PEERCRED), which turns out to be functionally
> equivalent to SO_PEERCRED: in particular, you can just call it and get
> the answer without having to fool with getting the far end to send a
> message.  This is not only a whole lot cleaner than what we have, but
> also could be used to implement libpq's requirepeer option, which is
> currently unsupported on such platforms.
> 
> So what I'm now thinking is we should rip out the control-message
> implementation altogether, and instead use LOCAL_PEERCRED.  This is
> probably not something to back-patch, but it would make things a lot
> cleaner going forward.

Oh yes, no point in having complicated code that doesn't get exercised.



pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: [PATCH] Bug in XPATH() if expression returns a scalar value
Next
From: Alvaro Herrera
Date:
Subject: Re: creating CHECK constraints as NOT VALID