summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1997-03-21 16:52:05 +0000
committerBill Paul <wpaul@FreeBSD.org>1997-03-21 16:52:05 +0000
commiteffbdb690f9d17f6a5d6ce7f3787f22185a25f52 (patch)
tree747575429a8efaff40729413b01b2315d530a413 /lib
parent0b788fa1dae7ae26d13e1e77c1476b4697bb2d2d (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/recv.228
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/libc/sys/recv.2 b/lib/libc/sys/recv.2
index 575102249f61..fdf02e32631e 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.