Hi, The following code contains tests to check support for sending SCM_RIGHTS and SCM_CREDS (SCM_CREDENTIALS and SO_PEERCRED on Linux) over a UNIX socket. Zero to three file descriptors are sent and zero or one credentials request is made. It has been tested on Linux, kFreeBSD and Hurd (with and w/o SCM_CREDS support). Different cases are enabled by: make clean; make CFLAGS='-DNRIGHTS=[0,..,3] -DNCREDS=[0,1]'; ./scm_rights+creds_recv & ./scm_rights+creds_send (case 0,0 does not work on Linux and kFreeBSD, but that case has little interest). An RFC for a Hurd patch for joint SCM_CREDS and SCM_RIGHTS support will follow shortly. Thanks, Svante
Attachment:
test_scm_rights+creds.tar.gz
Description: application/compressed-tar