rcmd.3 (7f3dea244c40159a41ab22da77a434d7c5b5e85a) | rcmd.3 (42b4f28ebdf07192c1a09a8711cb7c31a09b9381) |
---|---|
1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 25 unchanged lines hidden (view full) --- 34.\" 35.Dd February 15, 1996 36.Dt RCMD 3 37.Os BSD 4.2 38.Sh NAME 39.Nm rcmd , 40.Nm rresvport , 41.Nm iruserok , | 1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 25 unchanged lines hidden (view full) --- 34.\" 35.Dd February 15, 1996 36.Dt RCMD 3 37.Os BSD 4.2 38.Sh NAME 39.Nm rcmd , 40.Nm rresvport , 41.Nm iruserok , |
42.Nm ruserok | 42.Nm ruserok , 43.Nm rresvport_af , 44.Nm iruserok_af , 45.Nm ruserok_af |
43.Nd routines for returning a stream to a remote command 44.Sh SYNOPSIS 45.Fd #include <unistd.h> 46.Ft int 47.Fn rcmd "char **ahost" "int inport" "const char *locuser" "const char *remuser" "const char *cmd" "int *fd2p" 48.Ft int 49.Fn rresvport "int *port" 50.Ft int 51.Fn iruserok "u_long raddr" "int superuser" "const char *ruser" "const char *luser" 52.Ft int 53.Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser" | 46.Nd routines for returning a stream to a remote command 47.Sh SYNOPSIS 48.Fd #include <unistd.h> 49.Ft int 50.Fn rcmd "char **ahost" "int inport" "const char *locuser" "const char *remuser" "const char *cmd" "int *fd2p" 51.Ft int 52.Fn rresvport "int *port" 53.Ft int 54.Fn iruserok "u_long raddr" "int superuser" "const char *ruser" "const char *luser" 55.Ft int 56.Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser" |
57.Ft int 58.Fn rresvport_af "int *port" "int family" 59.Ft int 60.Fn iruserok_af "void *raddr" "int superuser" "const char *ruser" "const char *luser" "int af" 61.Ft int 62.Fn ruserok_af "const char *rhost" "int superuser" "const char *ruser" "const char *luser" "int af" |
|
54.Sh DESCRIPTION 55The 56.Fn rcmd 57function 58is used by the super-user to execute a command on 59a remote machine using an authentication scheme based 60on reserved port numbers. 61The --- 106 unchanged lines hidden (view full) --- 168is the same as the remote domain, only the machine name need be specified. 169.Pp 170The 171.Fn iruserok 172function is strongly preferred for security reasons. 173It requires trusting the local DNS at most, while the 174.Fn ruserok 175function requires trusting the entire DNS, which can be spoofed. | 63.Sh DESCRIPTION 64The 65.Fn rcmd 66function 67is used by the super-user to execute a command on 68a remote machine using an authentication scheme based 69on reserved port numbers. 70The --- 106 unchanged lines hidden (view full) --- 177is the same as the remote domain, only the machine name need be specified. 178.Pp 179The 180.Fn iruserok 181function is strongly preferred for security reasons. 182It requires trusting the local DNS at most, while the 183.Fn ruserok 184function requires trusting the entire DNS, which can be spoofed. |
185.Pp 186Functions with ``_af'' suffix, i.e. 187.Fn rresvport_af , 188.Fn iruserok_af and 189.Fn ruserok_af , 190works just as same as functions without ``_af'', and is capable of 191handling both IPv6 port and IPv4 port. 192To switch address family, 193.Fa af 194argument must be filled with 195.Dv AF_INET 196or 197.Dv AF_INET6 . |
|
176.Sh DIAGNOSTICS 177The 178.Fn rcmd 179function 180returns a valid socket descriptor on success. 181It returns \-1 on error and prints a diagnostic message on the standard error. 182.Pp 183The --- 9 unchanged lines hidden (view full) --- 193.Sh SEE ALSO 194.Xr rlogin 1 , 195.Xr rsh 1 , 196.Xr intro 2 , 197.Xr rexec 3 , 198.Xr rexecd 8 , 199.Xr rlogind 8 , 200.Xr rshd 8 | 198.Sh DIAGNOSTICS 199The 200.Fn rcmd 201function 202returns a valid socket descriptor on success. 203It returns \-1 on error and prints a diagnostic message on the standard error. 204.Pp 205The --- 9 unchanged lines hidden (view full) --- 215.Sh SEE ALSO 216.Xr rlogin 1 , 217.Xr rsh 1 , 218.Xr intro 2 , 219.Xr rexec 3 , 220.Xr rexecd 8 , 221.Xr rlogind 8 , 222.Xr rshd 8 |
223.Pp 224W. Stevens and M. Thomas, ``Advanced Socket API for IPv6,'' 225RFC2292. |
|
201.Sh HISTORY 202These 203functions appeared in 204.Bx 4.2 . | 226.Sh HISTORY 227These 228functions appeared in 229.Bx 4.2 . |
230.Fn rresvport_af 231appeared in RFC2292, and implemented by WIDE project 232for Hydrangea IPv6 protocol stack kit. 233.Fn iruserok_af 234and 235.Fn rusreok_af 236are proposed and implemented by WIDE project 237for Hydrangea IPv6 protocol stack kit. |
|