From 9d4ed109cdc96ae0dc3a4f23f6deeb1fe7b4d471 Mon Sep 17 00:00:00 2001 From: dd Date: Tue, 21 Aug 2001 19:32:47 +0000 Subject: [PATCH] Use .In, .Ux, and .Rv where appropriate. Also consistently call this a "function" instead of a "routine". Submitted by: ru --- lib/libc/gen/getpeereid.3 | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/lib/libc/gen/getpeereid.3 b/lib/libc/gen/getpeereid.3 index f59a96ee4e2c..87078de4d354 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 -.Fd #include +.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 .