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 |