diff options
author | wpaul <wpaul@FreeBSD.org> | 1997-03-21 16:52:05 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1997-03-21 16:52:05 +0000 |
commit | 442f5f318a0e8465711c64b917e837849b8d4f4f (patch) | |
tree | 44a15d54dda5ead1684de51f1fca0889e63f1c9d /lib | |
parent | cdd7ea42624c882c277e717173e0d9f2d4edfbd1 (diff) | |
download | FreeBSD-src-442f5f318a0e8465711c64b917e837849b8d4f4f.zip FreeBSD-src-442f5f318a0e8465711c64b917e837849b8d4f4f.tar.gz |
Document SCM_CREDS changes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/recv.2 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/libc/sys/recv.2 b/lib/libc/sys/recv.2 index 5751022..fdf02e3 100644 --- a/lib/libc/sys/recv.2 +++ b/lib/libc/sys/recv.2 @@ -200,6 +200,34 @@ and set to .Dv SCM_RIGHTS . .Pp +Process credentials can also be passed as ancillary data for +.Dv AF_UNIX +domain sockets using a +.Fa cmsg_type +of +.Dv SCM_CREDS. +In this case, +.Fa cmsg_data +should be a structure of type +.Fa cmsgcred , +which is defined in +.Ao Pa sys/socket.h Ac +as follows: +.Pp +.Bd -literal +struct cmsgcred { + pid_t cmcred_pid; /* PID of sending process */ + uid_t cmcred_uid; /* real UID of sending process */ + uid_t cmcred_euid; /* effective UID of sending process */ + gid_t cmcred_gid; /* real GID of sending process */ + short cmcred_ngroups; /* number or groups */ + gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ +}; +.Ed +.Pp +The kernel will fill in the credential information of the sending process +and deliver it to the receiver. +.Pp The .Fa msg_flags field is set on return according to the message received. |