1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\" must display the following acknowledgement:
15 .\" This product includes software developed by the University of
16 .\" California, Berkeley and its contributors.
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\" may be used to endorse or promote products derived from this software
19 .\" without specific prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" @(#)rexec.3 8.1 (Berkeley) 6/4/93
35 .\" $FreeBSD: src/lib/libcompat/4.3/rexec.3,v 1.12 2004/07/02 23:52:14 ru Exp $
37 .\" Taken from FreeBSD 5.4; not checked against Linux reality (mtk)
39 .\" 2013-06-21, mtk, Converted from mdoc to man macros
41 .TH REXEC 3 2013-09-26 "Linux" "Linux Programmer's Manual"
43 rexec, rexec_af \- return stream to a remote command
46 .BR "#define _BSD_SOURCE" " /* See feature_test_macros(7) */"
49 .BI "int rexec(char **" ahost ", int " inport ", char *" user ", "
50 .BI " char *" passwd ", char *" cmd ", int *" fd2p );
52 .BI "int rexec_af(char **" ahost ", int " inport ", char *" user ", "
53 .BI " char *" passwd ", char *" cmd ", int *" fd2p ,
54 .BI " sa_family_t " af );
57 This interface is obsoleted by
66 .BR gethostbyname (3),
67 returning \-1 if the host does not exist.
70 is set to the standard name of the host.
71 If a username and password are both specified, then these
72 are used to authenticate to the foreign host; otherwise
73 the environment and then the
76 home directory are searched for appropriate information.
77 If all this fails, the user is prompted for the information.
81 specifies which well-known DARPA Internet port to use for
82 the connection; the call
83 .I "getservbyname(""exec"", ""tcp"")"
86 will return a pointer to a structure that contains the necessary port.
87 The protocol for connection is described in detail in
90 If the connection succeeds,
91 a socket in the Internet domain of type
94 the caller, and given to the remote command as
100 is nonzero, then an auxiliary channel to a control
101 process will be setup, and a descriptor for it will be placed
104 The control process will return diagnostic
105 output from the command (unit 2) on this channel, and will also
106 accept bytes on this channel as being UNIX signal numbers, to be
107 forwarded to the process group of the command.
109 information returned does not include remote authorization failure,
110 as the secondary connection is set up after authorization has been
116 (unit 2 of the remote
117 command) will be made the same as the
120 provision is made for sending arbitrary signals to the remote process,
121 although you may be able to get its attention by using out-of-band data.
125 function works over IPv4
129 function provides an extra argument,
131 that allows the caller to select the protocol.
132 This argument can be specified as
137 (to allow the implementation to select the protocol).
141 function was added to glibc in version 2.2.
143 .SS Multithreading (see pthreads(7))
148 functions are not thread-safe.
150 These functions are not in POSIX.1-2001.
153 function first appeared in
154 4.2BSD, and is present on the BSDs, Solaris, and many other systems.
157 function is more recent, and less widespread.
161 function sends the unencrypted password across the network.
163 The underlying service is considered a big security hole and therefore
164 not enabled on many sites; see
171 This page is part of release 3.67 of the Linux
174 A description of the project,
175 information about reporting bugs,
176 and the latest version of this page,
178 \%http://www.kernel.org/doc/man\-pages/.