| REXEC(3) | Library Functions Manual | REXEC(3) |
NAME
rexec — return
stream to a remote command
LIBRARY
Compatibility Library (libcompat, -lcompat)
SYNOPSIS
int
rexec(char
**ahost, int
inport, char *user,
char *passwd,
char *cmd,
int *fd2p);
DESCRIPTION
The
rexec()
function looks up the host *ahost using
gethostbyname(3), returning -1 if the host does not exist.
Otherwise *ahost is set to the standard name of the
host. If a username and password are both specified, then these are used to
authenticate to the foreign host; otherwise the environment and then the
user's .netrc file in his home directory are
searched for appropriate information. If all this fails, the user is
prompted for the information.
The port inport specifies
which well-known DARPA Internet port to use for the connection; the call
getservbyname("exec",
"tcp") (see getservent(3))
will return a pointer to a structure, which contains the necessary port. The
protocol for connection is described in detail in
rexecd(8).
If the connection succeeds, a socket in the Internet domain of
type SOCK_STREAM is returned to the caller, and
given to the remote command as stdin and
stdout. If fd2p is non-zero,
then an auxiliary channel to a control process will be setup, and a
descriptor for it will be placed in *fd2p. The control
process will return diagnostic output from the command (unit 2) on this
channel, and will also accept bytes on this channel as being
UNIX signal numbers, to be forwarded to the process
group of the command. The diagnostic information returned does not include
remote authorization failure, as the secondary connection is set up after
authorization has been verified. If fd2p is 0, then
the stderr (unit 2 of the remote command) will be
made the same as the stdout and no provision is made
for sending arbitrary signals to the remote process, although you may be
able to get its attention by using out-of-band data.
CONFORMING TO
Not in POSIX.1-2001. Present on the BSDs, Solaris, and many other
systems. The
rexec()
function appeared in 4.2BSD.
BUGS
The rexec() function sends the unencrypted
password across the network.
The underlying service is considered a big security hole and therefore not enabled on many sites, see rexecd(8) for explanations.
SEE ALSO
rcmd(3), rexecd(8) This page is part of release 2.69 of the Linux project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.
| June 4, 1993 | Debian |
Different Versions of this Page:
- Version 6.17 (latest)
- Version 6.16
- Version 6.15
- Version 6.14
- Version 6.13
- Version 6.12
- Version 6.11
- Version 6.10
- Version 6.9.1
- Version 6.9
- Version 6.8
- Version 6.7
- Version 6.06
- Version 6.05.01
- Version 6.05
- Version 6.04
- Version 6.03
- Version 6.02
- Version 6.01
- Version 6.00
- Version 5.13
- Version 5.12
- Version 5.11
- Version 5.10
- Version 5.09
- Version 5.08
- Version 5.07
- Version 5.06
- Version 5.05
- Version 5.04
- Version 5.03
- Version 5.02
- Version 5.01
- Version 5.00
- Version 4.16
- Version 4.15
- Version 4.14
- Version 4.13
- Version 4.12
- Version 4.10
- Version 4.09
- Version 4.08
- Version 4.07
- Version 4.06
- Version 4.05
- Version 4.04
- Version 4.03
- Version 4.02
- Version 4.01
- Version 4.00
- Version 3.83
- Version 3.82
- Version 3.81
- Version 3.80
- Version 3.79
- Version 3.78
- Version 3.77
- Version 3.76
- Version 3.75
- Version 3.74
- Version 3.73
- Version 3.72
- Version 3.71
- Version 3.70
- Version 3.69
- Version 3.68
- Version 3.67
- Version 3.66
- Version 3.65
- Version 3.64
- Version 3.63
- Version 3.62
- Version 3.61
- Version 3.60
- Version 3.59
- Version 3.58
- Version 3.57
- Version 3.56
- Version 3.55
- Version 3.54
- Version 3.53
- Version 3.52
- Version 3.49
- Version 3.48
- Version 3.47
- Version 3.46
- Version 3.45
- Version 3.44
- Version 3.43
- Version 3.42
- Version 3.41
- Version 3.40
- Version 3.39
- Version 3.38
- Version 3.37
- Version 3.36
- Version 3.35
- Version 3.34
- Version 3.33
- Version 3.32
- Version 3.31
- Version 3.30
- Version 3.29
- Version 3.28
- Version 3.27
- Version 3.26
- Version 3.25
- Version 3.24
- Version 3.23
- Version 3.22
- Version 3.21
- Version 3.20
- Version 3.17
- Version 3.16
- Version 3.15
- Version 3.14
- Version 3.13
- Version 3.12
- Version 3.11
- Version 3.10
- Version 3.09
- Version 3.08
- Version 3.07
- Version 3.06
- Version 3.05
- Version 3.04
- Version 3.03
- Version 3.02
- Version 3.01
- Version 3.00
- Version 2.80
- Version 2.79
- Version 2.78
- Version 2.77
- Version 2.76
- Version 2.75
- Version 2.74
- Version 2.73
- Version 2.72
- Version 2.71
- Version 2.70
- Version 2.69
- Version 2.68
- Version 2.67
- Version 2.66
- Version 2.65
- Version 2.64
- Version 2.63
- Version 2.62
- Version 2.61
- Version 2.60
- Version 2.59
- Version 2.58
- Version 2.57
- Version 2.56
- Version 2.55
- Version 2.54
- Version 2.53
- Version 2.52
- Version 2.51
- Version 2.50
- Version 2.49
- Version 2.48
- Version 2.47
- Version 2.46
- Version 2.45
- Version 2.44
- Version 2.43
- Version 2.42
- Version 2.41
- Version 2.40
- Version 2.39
- Version 2.38
- Version 2.37
- Version 2.36
- Version 2.35
- Version 2.34
- Version 2.33
- Version 2.32
- Version 2.31
- Version 2.30
- Version 2.29
- Version 2.28
- Version 2.27
- Version 2.26
- Version 2.25
- Version 2.24
- Version 2.23
- Version 2.22
- Version 2.21
- Version 2.20
- Version 2.19
- Version 2.18
- Version 2.17
- Version 2.16
- Version 2.15
- Version 2.14