summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/rcmd.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/rcmd.3')
-rw-r--r--src/lib/libc/net/rcmd.327
1 files changed, 19 insertions, 8 deletions
diff --git a/src/lib/libc/net/rcmd.3 b/src/lib/libc/net/rcmd.3
index d086e875bf..5f6ff98459 100644
--- a/src/lib/libc/net/rcmd.3
+++ b/src/lib/libc/net/rcmd.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: rcmd.3,v 1.13 1999/07/05 04:41:00 aaron Exp $ 1.\" $OpenBSD: rcmd.3,v 1.14 1999/12/16 21:30:34 deraadt Exp $
2.\" 2.\"
3.\" Copyright (c) 1983, 1991, 1993 3.\" Copyright (c) 1983, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -47,6 +47,8 @@
47.Ft int 47.Ft int
48.Fn rresvport "int *port" 48.Fn rresvport "int *port"
49.Ft int 49.Ft int
50.Fn rresvport_af "int *port" "int af"
51.Ft int
50.Fn iruserok "u_int32_t raddr" "int superuser" "const char *ruser" "const char *luser" 52.Fn iruserok "u_int32_t raddr" "int superuser" "const char *ruser" "const char *luser"
51.Ft int 53.Ft int
52.Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser" 54.Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser"
@@ -73,8 +75,10 @@ to run the command via
73.Xr rsh 1 . 75.Xr rsh 1 .
74The 76The
75.Fn rresvport 77.Fn rresvport
76function 78and
77returns a descriptor to a socket 79.Fn rresvport_af
80functions
81return a descriptor to a socket
78with an address in the privileged port space. 82with an address in the privileged port space.
79The 83The
80.Fn iruserok 84.Fn iruserok
@@ -142,7 +146,9 @@ The protocol is described in detail in
142.Pp 146.Pp
143The 147The
144.Fn rresvport 148.Fn rresvport
145function is used to obtain a socket with a privileged 149and
150.Fn rresvport_af
151functions are used to obtain a socket with a privileged
146address bound to it. This socket is suitable for use 152address bound to it. This socket is suitable for use
147by 153by
148.Fn rcmd 154.Fn rcmd
@@ -150,8 +156,10 @@ and several other functions. Privileged Internet ports are those
150in the range 0 to 1023. Only the super-user 156in the range 0 to 1023. Only the super-user
151is allowed to bind an address of this sort to a socket. 157is allowed to bind an address of this sort to a socket.
152.Fn rresvport 158.Fn rresvport
153needs to be seeded with a port number; if that port 159and
154is not available it will find another. 160.Fn rresvport_af
161need to be seeded with a port number; if that port
162is not available these functions will find another.
155.Pp 163.Pp
156The 164The
157.Fn iruserok 165.Fn iruserok
@@ -200,8 +208,10 @@ It returns \-1 on error and prints a diagnostic message on the standard error.
200.Pp 208.Pp
201The 209The
202.Fn rresvport 210.Fn rresvport
203function 211and
204returns a valid, bound socket descriptor on success. 212.Fn rresvport_af
213functions
214return a valid, bound socket descriptor on success.
205It returns \-1 on error with the global value 215It returns \-1 on error with the global value
206.Va errno 216.Va errno
207set according to the reason for failure. 217set according to the reason for failure.
@@ -214,6 +224,7 @@ is overloaded to mean
214.Xr rsh 1 , 224.Xr rsh 1 ,
215.Xr intro 2 , 225.Xr intro 2 ,
216.Xr bindresvport 3 , 226.Xr bindresvport 3 ,
227.Xr bindresvport_af 3 ,
217.Xr rcmdsh 3 , 228.Xr rcmdsh 3 ,
218.Xr rexec 3 , 229.Xr rexec 3 ,
219.Xr rexecd 8 , 230.Xr rexecd 8 ,