[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#95818: libpgsql2.1: should not depend on ident-server



On Mon, 30 Apr 2001, Oliver Elphick wrote:

>>This works for Unix sockets under Linux 2.2 and Linux 2.4, at least.  I don't
>>know how portable the interface is beyond that, and lack of portability might
>>prevent upstream from adopting it.  It would be interesting to see this as an
>>option for Debian, though.  (Does Hurd implement SO_PEERCRED?)

> Yes; this makes it look possible - I am pretty sure it is not portable,
> though, so it won't be an upstream option.

> How portable is it within Linux?  I just tried looking for the documentation
> on it in libc.info and couldn't find anything.

I seem to recall first being tipped off to the existence of this facility in a
book on generic SysV programming, but this might just be my memory playing
tricks on me.  At the very least, it works on all Linux kernels we support in
Debian (unstable).

An earlier interface I had been using, trying to pop SCM_CREDENTIALS messages
off the socket manually, is apparently less portable, as my code started
segfaulting when run under 2.4. :)

Steve Langasek
postmodern programmer



Reply to: