summaryrefslogtreecommitdiff
path: root/gnu/libexec
diff options
context:
space:
mode:
authoris <is@NetBSD.org>2005-09-07 12:38:16 +0000
committeris <is@NetBSD.org>2005-09-07 12:38:16 +0000
commit8750386a4df7592eadcf3faf96226d450e083541 (patch)
treeee323da5b8d7a27595d6b3bb9a467cd306c78c41 /gnu/libexec
parent3d40ace0a6db74d46c1c7de0e6a8bad2b2a0ffaf (diff)
Allow for \H -> "address ..." substitution in PIPE ports. Useful
e.g. for generic UUCP over SSH or SSL... Idea and part of the patch by Joerg Durchain, has apparently been integrated in Debian for a while.
Diffstat (limited to 'gnu/libexec')
-rw-r--r--gnu/libexec/uucp/doc/uucp.texi10
-rw-r--r--gnu/libexec/uucp/libunix/pipe.c9
2 files changed, 14 insertions, 5 deletions
diff --git a/gnu/libexec/uucp/doc/uucp.texi b/gnu/libexec/uucp/doc/uucp.texi
index c702ec92c16..b9941a3ea78 100644
--- a/gnu/libexec/uucp/doc/uucp.texi
+++ b/gnu/libexec/uucp/doc/uucp.texi
@@ -4241,7 +4241,8 @@ using the @code{speed} command to select ports from the port file.
@findex address
Give a phone number to call (when using a modem port) or a remote host
-to contact (when using a TCP or TLI port). The commands @code{phone}
+to contact (when using a TCP or TLI port) or insert as parameter to a
+command string (when using a PIPE port). The commands @code{phone}
and @code{address} are equivalent; the duplication is intended to
provide a mnemonic choice depending on the type of port in use.
@@ -5246,7 +5247,8 @@ When a port of this type is used, the command is executed and
only be reached through some unusual means. A sample use might be
@samp{command /bin/rlogin -E -8 -l @var{login} @var{system}}. The
command is run with the full privileges of UUCP; it is responsible for
-maintaining security.
+maintaining security. The string @kbd{\H} is replaced with the remote
+host name given by the @code{address} command.
@end table
@@ -5649,8 +5651,8 @@ Keywords: UUCP, protocol, FAQ
Approved: news-answers-request@@MIT.Edu
Archive-name: uucp-internals
-Version: $Revision: 1.5 $
-Last-modified: $Date: 2003/01/06 20:30:43 $
+Version: $Revision: 1.6 $
+Last-modified: $Date: 2005/09/07 12:38:16 $
@end format
@end ifset
diff --git a/gnu/libexec/uucp/libunix/pipe.c b/gnu/libexec/uucp/libunix/pipe.c
index e290dc1acb6..d896d8d62d2 100644
--- a/gnu/libexec/uucp/libunix/pipe.c
+++ b/gnu/libexec/uucp/libunix/pipe.c
@@ -27,7 +27,7 @@
#include "uucp.h"
#if USE_RCS_ID
-const char pipe_rcsid[] = "$Id: pipe.c,v 1.2 1995/08/24 05:20:05 jtc Exp $";
+const char pipe_rcsid[] = "$Id: pipe.c,v 1.3 2005/09/07 12:38:16 is Exp $";
#endif
#include "uudefs.h"
@@ -199,6 +199,7 @@ fspipe_dial (qconn, puuconf, qsys, zphone, qdialer, ptdialer)
struct ssysdep_conn *q;
int aidescs[3];
const char **pzprog;
+ const char **p;
q = (struct ssysdep_conn *) qconn->psysdep;
@@ -212,6 +213,12 @@ fspipe_dial (qconn, puuconf, qsys, zphone, qdialer, ptdialer)
return FALSE;
}
+ /* Look for a string \H and substitute the address given for this system */
+ for (p=pzprog; *p; p++)
+ if (!strcmp(*p, "\\H"))
+ *p = zphone;
+
+
aidescs[0] = SPAWN_WRITE_PIPE;
aidescs[1] = SPAWN_READ_PIPE;
aidescs[2] = SPAWN_NULL;