tech-kern archive

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

SCM_CREDS ancillary data


Although not specifically a kernel issue, reading kern/uipc_userreq.c
was needed while I was doing the test.  I've used SCM_RIGHTS to pass
file descriptors successfully between two processes a while ago, but
this attempts to obtain client user credentials from an AF_LOCAL

Unfortunately the control message length always still appears to be
zero in my tests

On some OSs the sender must send a cmsghdr with SCM_CREDS set but
without appended creds structure, and length set to the cmsghdr only. 
On NetBSD, it appears that the client cannot do so (EINVAL results,
and uipc_userreq.c read confirms that only SCM_RIGHTS can be sent).
I've also tried setting the UNP_WANTCREDS flag immediately before
send/recv calls via setsockopt(2) but this did not work either.
SO_LOCALCRED also doesn't seem to exist on NetBSD, so I'm confused.

If anyone knows what I'm doing wrong in this test I would be
Matthew Mondor

Home | Main Index | Thread Index | Old Index