Bruce Momjian writes:
> OK, here is an even better version. It handles the lack of alignment in
> the the structure passing. This works on BSD/OS and should work on
> FreeBSD too.
Since this patch overwrites the previous SO_PEERCRED patch I assume you
want it to work on Linux, too. On Linux SCM_CREDS is called
SCM_CREDENTIALS. There's no sys/ucred.h (use sys/socket.h instead), and
there's no fc_uid, though I don't know what that does. The invocation
changes to StrNCpy look suspicious; see the comment at StrNCpy in c.h. In
one place you include errno.h twice.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter