Re: Add another AUTHTYPE for UNIX-domain connections - Mailing list pgsql-patches

From Anton Berezin
Subject Re: Add another AUTHTYPE for UNIX-domain connections
Date
Msg-id 20011203022922.B42199@heechee.tobez.org
Whole thread Raw
In response to Re: Add another AUTHTYPE for UNIX-domain connections  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Add another AUTHTYPE for UNIX-domain connections
List pgsql-patches
On Sun, Dec 02, 2001 at 08:25:48PM -0500, Tom Lane wrote:
> Anton Berezin <tobez@tobez.org> writes:
> > On some platforms, it is possible to reliably determine the effective
> > credentials of a UNIX-domain peer.
>
> Umm ... I think this is in 7.2 already, although not using getpeereid.

Oops.  :-)
>
> Anyone have an idea whether there are platforms that have getpeereid but
> not SO_PEERCRED or SCM_CREDS?  If so it might be worth adding getpeereid
> as an alternate implementation in ident_unix().

Yes.  From FreeBSD's getpeereid(2) manpage:

IMPLEMENTATION NOTES
    On FreeBSD, getpeereid() is implemented in terms of the
    LOCAL_PEERCRED unix(4) socket option.

Cheers,
+Anton.
--
| Anton Berezin                |      FreeBSD: The power to serve |
| catpipe Systems ApS   _ _ |_ |           http://www.FreeBSD.org |
| tobez@catpipe.net    (_(_||  |                tobez@FreeBSD.org |
| +45 7021 0050                |         Private: tobez@tobez.org |

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add another AUTHTYPE for UNIX-domain connections
Next
From: Tom Lane
Date:
Subject: Re: Add another AUTHTYPE for UNIX-domain connections