summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-08-21 19:32:47 +0000
committerdd <dd@FreeBSD.org>2001-08-21 19:32:47 +0000
commita53b7a0080ad6e087a712eb60c6c816de1baf8ef (patch)
treea4ff10e1180201aea7989cdbcf090b748ff20eb1 /lib/libc/gen
parentbed180befd38e6150619c993078cf3de8bbd7810 (diff)
downloadFreeBSD-src-a53b7a0080ad6e087a712eb60c6c816de1baf8ef.zip
FreeBSD-src-a53b7a0080ad6e087a712eb60c6c816de1baf8ef.tar.gz
Use .In, .Ux, and .Rv where appropriate. Also consistently call this
a "function" instead of a "routine". Submitted by: ru
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/getpeereid.334
1 files changed, 16 insertions, 18 deletions
diff --git a/lib/libc/gen/getpeereid.3 b/lib/libc/gen/getpeereid.3
index f59a96e..87078de 100644
--- a/lib/libc/gen/getpeereid.3
+++ b/lib/libc/gen/getpeereid.3
@@ -34,18 +34,22 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <unistd.h>
+.In sys/types.h
+.In unistd.h
.Ft int
.Fn getpeereid "int s" "uid_t *euid" "gid_t *egid"
.Sh DESCRIPTION
The
.Fn getpeereid
-routine returns the effective user and group IDs of the
-peer connected to a UNIX-domain socket.
+function returns the effective user and group IDs of the
+peer connected to a
+.Ux Ns -domain
+socket.
The argument
.Fa s
-must be a UNIX-domain socket
+must be a
+.Ux Ns -domain
+socket
.Pq Xr unix 4
of type
.Dv SOCK_STREAM
@@ -75,7 +79,9 @@ or
.Xr listen 2 )
under different effective credentials.
.Pp
-One common use of this routine is for a UNIX-domain server
+One common use of this routine is for a
+.Ux Ns -domain
+server
to verify the credentials of its client.
Likewise, the client can verify the credentials of the server.
.Sh IMPLEMENTATION NOTES
@@ -87,18 +93,10 @@ is implemented in terms of the
.Xr unix 4
socket option.
.Sh RETURN VALUES
-If the call succeeds, a value of 0 is returned and
-.Fa euid
-and
-.Fa egid
-contain the effective user and group IDs of the peer on
-.Fa s ,
-respectively.
-If the call fails, a value of \-1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std getpeerid
.Sh ERRORS
-The call succeeds unless:
+.Fn getpeerid
+fails if:
.Bl -tag -width Er
.It Bq Er EBADF
The argument
@@ -132,5 +130,5 @@ does not refer to a socket of type
.Sh HISTORY
The
.Fn getpeereid
-routine appeared in
+function appeared in
.Fx 5.0 .
OpenPOWER on IntegriCloud