OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / rexec.3
index f7faa10..c2792a1 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright (c) 1983, 1991, 1993
 .\"     The Regents of the University of California.  All rights reserved.
 .\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
+.\" %%%LICENSE_END
 .\"
 .\"     @(#)rexec.3     8.1 (Berkeley) 6/4/93
 .\" $FreeBSD: src/lib/libcompat/4.3/rexec.3,v 1.12 2004/07/02 23:52:14 ru Exp $
 .\"
 .\" Taken from FreeBSD 5.4; not checked against Linux reality (mtk)
 .\"
-.\" 2007-12-08, mtk, Converted from mdoc to man macros
+.\" 2013-06-21, mtk, Converted from mdoc to man macros
 .\"
-.TH REXEC 3 2007-12-28 "Linux" "Linux Programmer's Manual"
+.TH REXEC 3 2014-05-28 "Linux" "Linux Programmer's Manual"
 .SH NAME
-rexec \- return stream to a remote command
+rexec, rexec_af \- return stream to a remote command
 .SH SYNOPSIS
 .nf
+.BR "#define _BSD_SOURCE" "             /* See feature_test_macros(7) */"
+.B #include <netdb.h>
 .sp
-.BI "int rexec(char **" ahost ", int " inport ", char *" user ", "
-.BI "          char *" passwd ", char *" cmd ", int *" fd2p );
-.\" This function requires _BSD_SOURCE on Linux
+.BI "int rexec(char **" ahost ", int " inport ", const char *" user ", "
+.BI "          const char *" passwd ", const char *" cmd ", int *" fd2p );
+.sp
+.BI "int rexec_af(char **" ahost ", int " inport ", const char *" user ", "
+.BI "             const char *" passwd ", const char *" cmd ", int *" fd2p ,
+.BI "             sa_family_t " af  );
 .fi
 .SH DESCRIPTION
 This interface is obsoleted by
@@ -58,14 +65,14 @@ looks up the host
 using
 .BR gethostbyname (3),
 returning \-1 if the host does not exist.
-Otherwise
+Otherwise,
 .IR *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
+the environment and then the
 .I .netrc
-file in his
+file in user's
 home directory are searched for appropriate information.
 If all this fails, the user is prompted for the information.
 .PP
@@ -96,9 +103,7 @@ in
 .IR *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
+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,
@@ -114,22 +119,60 @@ command) will be made the same as the
 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.
-.SH "CONFORMING TO"
-Not in POSIX.1-2001.
-Present on the BSDs, Solaris, and many other systems.
+.SS rexec_af()
+The
+.BR rexec ()
+function works over IPv4
+.RB ( AF_INET ).
+By contrast, the
+.BR rexec_af ()
+function provides an extra argument,
+.IR af ,
+that allows the caller to select the protocol.
+This argument can be specified as
+.BR AF_INET ,
+.BR AF_INET6 ,
+or
+.BR AF_UNSPEC
+(to allow the implementation to select the protocol).
+.SH VERSIONS
+The
+.BR rexec_af ()
+function was added to glibc in version 2.2.
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
 The
 .BR rexec ()
-function appeared in
-4.2BSD.
+and
+.BR rexec_af ()
+functions are not thread-safe.
+.SH CONFORMING TO
+These functions are not in POSIX.1-2001.
+The
+.BR rexec ()
+function first appeared in
+4.2BSD, and is present on the BSDs, Solaris, and many other systems.
+The
+.BR rexec_af ()
+function is more recent, and less widespread.
 .SH BUGS
 The
 .BR rexec ()
 function sends the unencrypted password across the network.
 .PP
 The underlying service is considered a big security hole and therefore
-not enabled on many sites, see
+not enabled on many sites; see
 .BR rexecd (8)
 for explanations.
 .SH SEE ALSO
 .BR rcmd (3),
 .BR rexecd (8)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.