unix.4 (147398) | unix.4 (153603) |
---|---|
1.\" Copyright (c) 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)unix.4 8.1 (Berkeley) 6/9/93 | 1.\" Copyright (c) 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)unix.4 8.1 (Berkeley) 6/9/93 |
33.\" $FreeBSD: head/share/man/man4/unix.4 147398 2005-06-15 13:31:23Z ru $ | 33.\" $FreeBSD: head/share/man/man4/unix.4 153603 2005-12-21 08:23:04Z maxim $ |
34.\" 35.Dd July 15, 2001 36.Dt UNIX 4 37.Os 38.Sh NAME 39.Nm unix 40.Nd UNIX-domain protocol family 41.Sh SYNOPSIS --- 181 unchanged lines hidden (view full) --- 223.Vt cmsghdr 224structure followed by a variable length 225.Vt sockcred 226structure, defined in 227.In sys/socket.h 228as follows: 229.Bd -literal 230struct sockcred { | 34.\" 35.Dd July 15, 2001 36.Dt UNIX 4 37.Os 38.Sh NAME 39.Nm unix 40.Nd UNIX-domain protocol family 41.Sh SYNOPSIS --- 181 unchanged lines hidden (view full) --- 223.Vt cmsghdr 224structure followed by a variable length 225.Vt sockcred 226structure, defined in 227.In sys/socket.h 228as follows: 229.Bd -literal 230struct sockcred { |
231 id_t sc_uid; /* real user id */ | 231 uid_t sc_uid; /* real user id */ |
232 uid_t sc_euid; /* effective user id */ 233 gid_t sc_gid; /* real group id */ 234 gid_t sc_egid; /* effective group id */ 235 int sc_ngroups; /* number of supplemental groups */ 236 gid_t sc_groups[1]; /* variable length */ 237}; 238.Ed 239.Pp 240The 241.Fn SOCKCREDSIZE 242macro computes the size of the 243.Vt sockcred 244structure for a specified number 245of groups. 246The 247.Vt cmsghdr 248fields have the following values: 249.Bd -literal | 232 uid_t sc_euid; /* effective user id */ 233 gid_t sc_gid; /* real group id */ 234 gid_t sc_egid; /* effective group id */ 235 int sc_ngroups; /* number of supplemental groups */ 236 gid_t sc_groups[1]; /* variable length */ 237}; 238.Ed 239.Pp 240The 241.Fn SOCKCREDSIZE 242macro computes the size of the 243.Vt sockcred 244structure for a specified number 245of groups. 246The 247.Vt cmsghdr 248fields have the following values: 249.Bd -literal |
250cmsg_len = sizeof(struct cmsghdr) + SOCKCREDSIZE(ngroups) | 250cmsg_len = CMSG_LEN(SOCKCREDSIZE(ngroups)) |
251cmsg_level = SOL_SOCKET 252cmsg_type = SCM_CREDS 253.Ed 254.It Dv LOCAL_CONNWAIT 255Used with 256.Dv SOCK_STREAM 257sockets, this option causes the 258.Xr connect 2 --- 17 unchanged lines hidden --- | 251cmsg_level = SOL_SOCKET 252cmsg_type = SCM_CREDS 253.Ed 254.It Dv LOCAL_CONNWAIT 255Used with 256.Dv SOCK_STREAM 257sockets, this option causes the 258.Xr connect 2 --- 17 unchanged lines hidden --- |