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

Re: getpeercred() on kfreebsd?

I'm the maintainer of nss-ldapd. There is a slight problem on
kfreebsd-i386 and kfreebsd-amd64.

What is the best way on these architectures to get information about
clients that connect through a named socket?

It looks like a problem in our headers. On plain FreeBSD <sys/un.h> contains

/* Socket options. */
#define LOCAL_PEERCRED          0x001   /* retrieve peer credentials */
#define LOCAL_CREDS             0x002   /* pass credentials to receiver */
#define LOCAL_CONNWAIT          0x004   /* connects block until accepted */

We do not have it anywhere. It might be suitable for existing kfreebsd specific <bits/socket.h> or for new kfreebsd specific <bits/sockaddr.h>.

I currently use this code:
which works on a number of platforms but uses the fallthrough code at
the end on kfreebsd ports:

Also, the nss-ldapd test suite seems to fail on io.debian.org but not on
asdfasdf.debian.net. I haven't yet investigates this further though.

Please, could you test (on io.debian.org and asdfasdf.debian.net) whether adding above mentioned defines directly in getpeercred.c really works ?

Many thanks


Reply to: