From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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 19:38:08 |
Message-ID: | 1306870688.20912.2.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2011-05-31 20:07:03 | Re: creating CHECK constraints as NOT VALID |
Previous Message | Florian Pflug | 2011-05-31 19:28:50 | Re: [PATCH] Bug in XPATH() if expression returns a scalar value |