mirror of https://github.com/mkerrisk/man-pages
unix.7: Rework SO_PEERCRED text for greater clarity
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
88fedfa061
commit
3d3cddde94
22
man7/unix.7
22
man7/unix.7
|
@ -320,25 +320,29 @@ See
|
||||||
.BR socket (7).
|
.BR socket (7).
|
||||||
.TP
|
.TP
|
||||||
.B SO_PEERCRED
|
.B SO_PEERCRED
|
||||||
Return the credentials of the peer process connected to this socket.
|
This read-only socket option returns the
|
||||||
This is possible only for connected
|
credentials of the peer process connected to this socket.
|
||||||
.B AF_UNIX
|
|
||||||
stream sockets and
|
|
||||||
.B AF_UNIX
|
|
||||||
stream and datagram socket pairs created using
|
|
||||||
.BR socketpair (2).
|
|
||||||
The returned credentials are those that were in effect at the time
|
The returned credentials are those that were in effect at the time
|
||||||
of the call to
|
of the call to
|
||||||
.BR connect (2)
|
.BR connect (2)
|
||||||
or
|
or
|
||||||
.BR socketpair (2).
|
.BR socketpair (2).
|
||||||
The argument is a
|
.IP
|
||||||
|
The argument to
|
||||||
|
.BR getsockopt (2)
|
||||||
|
is a pointer to a
|
||||||
.I ucred
|
.I ucred
|
||||||
structure; define the
|
structure; define the
|
||||||
.B _GNU_SOURCE
|
.B _GNU_SOURCE
|
||||||
feature test macro to obtain the definition of that structure from
|
feature test macro to obtain the definition of that structure from
|
||||||
.IR <sys/socket.h> .
|
.IR <sys/socket.h> .
|
||||||
This socket option is read-only.
|
.IP
|
||||||
|
The use of this option is possible only for connected
|
||||||
|
.B AF_UNIX
|
||||||
|
stream sockets and for
|
||||||
|
.B AF_UNIX
|
||||||
|
stream and datagram socket pairs created using
|
||||||
|
.BR socketpair (2).
|
||||||
.\"
|
.\"
|
||||||
.SS Autobind feature
|
.SS Autobind feature
|
||||||
If a
|
If a
|
||||||
|
|
Loading…
Reference in New Issue