Bugzilla – Attachment 1359 Details for
Bug 1368
avoid "scp not found" with option to specify remote scp command
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add -R option to scp
bug.scp.txt (text/plain), 2.92 KB, created by
David Leonard
on 2007-09-24 22:53:56 AEST
(
hide
)
Description:
Add -R option to scp
Filename:
MIME Type:
Creator:
David Leonard
Created:
2007-09-24 22:53:56 AEST
Size:
2.92 KB
patch
obsolete
>Index: openssh/scp.1 >=================================================================== >--- openssh/scp.1 (revision 201) >+++ openssh/scp.1 (working copy) >@@ -28,6 +28,7 @@ > .Op Fl o Ar ssh_option > .Op Fl P Ar port > .Op Fl S Ar program >+.Op Fl R Ar program > .Sm off > .Oo > .Op Ar user No @ >@@ -188,6 +189,13 @@ > The program must understand > .Xr ssh 1 > options. >+.It Fl R Ar program >+Name of the >+.Nm >+.Ar program >+to run on the remote server. >+Defaults to >+.Sq scp . > .It Fl v > Verbose mode. > Causes >Index: openssh/scp.c >=================================================================== >--- openssh/scp.c (revision 201) >+++ openssh/scp.c (working copy) >@@ -131,6 +131,9 @@ > /* This is the program to execute for the secured connection. ("ssh" or -S) */ > char *ssh_program = _PATH_SSH_PROGRAM; > >+/* This is the remote name of the scp program ("scp" or -R) */ >+char *scp_program = "scp"; >+ > /* This is used to store the pid of ssh_program */ > pid_t do_cmd_pid = -1; > >@@ -313,7 +316,7 @@ > addargs(&args, "-oClearAllForwardings yes"); > > fflag = tflag = 0; >- while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q1246S:o:F:")) != -1) >+ while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q1246S:o:F:R:")) != -1) > switch (ch) { > /* User-visible flags. */ > case '1': >@@ -347,6 +350,9 @@ > case 'r': > iamrecursive = 1; > break; >+ case 'R': >+ scp_program = xstrdup(optarg); >+ break; > case 'S': > ssh_program = xstrdup(optarg); > break; >@@ -408,7 +414,8 @@ > remin = remout = -1; > do_cmd_pid = -1; > /* Command to be executed on remote system using "ssh". */ >- (void) snprintf(cmd, sizeof cmd, "scp%s%s%s%s", >+ (void) snprintf(cmd, sizeof cmd, "%s%s%s%s%s", >+ scp_program, > verbose_mode ? " -v" : "", > iamrecursive ? " -r" : "", pflag ? " -p" : "", > targetshouldbedirectory ? " -d" : ""); >Index: openssh/regress/test-exec.sh >=================================================================== >--- openssh/regress/test-exec.sh (revision 201) >+++ openssh/regress/test-exec.sh (working copy) >@@ -94,7 +94,8 @@ > SFTPSERVER="${TEST_SSH_SFTPSERVER}" > fi > if [ "x$TEST_SSH_SCP" != "x" ]; then >- SCP="${TEST_SSH_SCP}" >+ SCP="${TEST_SSH_SCP} -R ${TEST_SSH_SCP}" >+ > fi > > # Path to sshd must be absolute for rexec >Index: openssh/Makefile.in >=================================================================== >--- openssh/Makefile.in (revision 201) >+++ openssh/Makefile.in (working copy) >@@ -392,6 +392,7 @@ > TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \ > TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \ > TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \ >+ TEST_SSH_SCP="$${BUILDDIR}/scp"; \ > TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \ > cd $(srcdir)/regress || exit $$?; \ > $(MAKE) \ >@@ -408,6 +409,7 @@ > TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \ > TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \ > TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \ >+ TEST_SSH_SCP="$${TEST_SSH_SCP}" \ > TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \ > EXEEXT="$(EXEEXT)" \ > $@
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1368
: 1359