aboutsummaryrefslogtreecommitdiffstats
path: root/man7/unix.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2018-12-23 18:24:06 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2018-12-23 19:09:33 +0100
commit3d3cddde9418e9d1c45122a41fb29d0e69db8dc8 (patch)
tree2e881b14119167db5873c24635985bc1170f29ab /man7/unix.7
parent88fedfa0611f1361fe3822dffa3007ca98d849d5 (diff)
downloadman-pages-3d3cddde9418e9d1c45122a41fb29d0e69db8dc8.tar.gz
unix.7: Rework SO_PEERCRED text for greater clarity
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/unix.7')
-rw-r--r--man7/unix.722
1 files changed, 13 insertions, 9 deletions
diff --git a/man7/unix.7 b/man7/unix.7
index e91484c7d5..1bc7804f0a 100644
--- a/man7/unix.7
+++ b/man7/unix.7
@@ -320,25 +320,29 @@ See
.BR socket (7).
.TP
.B SO_PEERCRED
-Return the credentials of the peer process connected to this socket.
-This is possible only for connected
-.B AF_UNIX
-stream sockets and
-.B AF_UNIX
-stream and datagram socket pairs created using
-.BR socketpair (2).
+This read-only socket option returns the
+credentials of the peer process connected to this socket.
The returned credentials are those that were in effect at the time
of the call to
.BR connect (2)
or
.BR socketpair (2).
-The argument is a
+.IP
+The argument to
+.BR getsockopt (2)
+is a pointer to a
.I ucred
structure; define the
.B _GNU_SOURCE
feature test macro to obtain the definition of that structure from
.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
If a