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: http://arthurenhella.demon.nl/viewcvs/nss-ldapd/nss-ldapd/compat/getpeercred.c?view=markup which works on a number of platforms but uses the fallthrough code at the end on kfreebsd ports: http://buildd.debian-ports.org/fetch.php?pkg=nss-ldapd&ver=0.6.2&arch=kfreebsd-i386&stamp=1210083229&file=log&as=raw http://buildd.debian-ports.org/fetch.php?pkg=nss-ldapd&ver=0.6.2&&arch=kfreebsd-amd64&stamp=1209995009&file=log&as=raw 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 Petr