summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2012-05-18 12:16:05 +0100
committerColin Watson <cjwatson@debian.org>2012-05-18 12:16:05 +0100
commitdabbdfacc9f6995b0739772a47704186dcf34ea5 (patch)
tree0a0b306a637bc85eb719261b74884f0b9573ec41 /scp.c
parent1e0d51b642cac9a6bfb719e6320905625aa5f943 (diff)
parentdd5ed53e20d218607260916a6b04d1c8c5b3d88f (diff)
* New upstream release (http://www.openssh.org/txt/release-6.0).
- Fix IPQoS not being set on non-mapped v4-in-v6 addressed connections (closes: #643312, #650512). - Add a new privilege separation sandbox implementation for Linux's new seccomp sandbox, automatically enabled on platforms that support it. (Note: privilege separation sandboxing is still experimental.)
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/scp.c b/scp.c
index 69344b804..c08d122ea 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: scp.c,v 1.170 2010/12/09 14:13:33 jmc Exp $ */ 1/* $OpenBSD: scp.c,v 1.171 2011/09/09 22:37:01 djm Exp $ */
2/* 2/*
3 * scp - secure remote copy. This is basically patched BSD rcp which 3 * scp - secure remote copy. This is basically patched BSD rcp which
4 * uses ssh to do the data transfer (instead of using rcmd). 4 * uses ssh to do the data transfer (instead of using rcmd).
@@ -609,12 +609,14 @@ toremote(char *targ, int argc, char **argv)
609 host = cleanhostname(argv[i]); 609 host = cleanhostname(argv[i]);
610 suser = NULL; 610 suser = NULL;
611 } 611 }
612 xasprintf(&bp, "%s -f -- %s", cmd, src); 612 xasprintf(&bp, "%s -f %s%s", cmd,
613 *src == '-' ? "-- " : "", src);
613 if (do_cmd(host, suser, bp, &remin, &remout) < 0) 614 if (do_cmd(host, suser, bp, &remin, &remout) < 0)
614 exit(1); 615 exit(1);
615 (void) xfree(bp); 616 (void) xfree(bp);
616 host = cleanhostname(thost); 617 host = cleanhostname(thost);
617 xasprintf(&bp, "%s -t -- %s", cmd, targ); 618 xasprintf(&bp, "%s -t %s%s", cmd,
619 *targ == '-' ? "-- " : "", targ);
618 if (do_cmd2(host, tuser, bp, remin, remout) < 0) 620 if (do_cmd2(host, tuser, bp, remin, remout) < 0)
619 exit(1); 621 exit(1);
620 (void) xfree(bp); 622 (void) xfree(bp);
@@ -660,7 +662,8 @@ toremote(char *targ, int argc, char **argv)
660 errs = 1; 662 errs = 1;
661 } else { /* local to remote */ 663 } else { /* local to remote */
662 if (remin == -1) { 664 if (remin == -1) {
663 xasprintf(&bp, "%s -t -- %s", cmd, targ); 665 xasprintf(&bp, "%s -t %s%s", cmd,
666 *targ == '-' ? "-- " : "", targ);
664 host = cleanhostname(thost); 667 host = cleanhostname(thost);
665 if (do_cmd(host, tuser, bp, &remin, 668 if (do_cmd(host, tuser, bp, &remin,
666 &remout) < 0) 669 &remout) < 0)
@@ -713,7 +716,8 @@ tolocal(int argc, char **argv)
713 suser = pwd->pw_name; 716 suser = pwd->pw_name;
714 } 717 }
715 host = cleanhostname(host); 718 host = cleanhostname(host);
716 xasprintf(&bp, "%s -f -- %s", cmd, src); 719 xasprintf(&bp, "%s -f %s%s",
720 cmd, *src == '-' ? "-- " : "", src);
717 if (do_cmd(host, suser, bp, &remin, &remout) < 0) { 721 if (do_cmd(host, suser, bp, &remin, &remout) < 0) {
718 (void) xfree(bp); 722 (void) xfree(bp);
719 ++errs; 723 ++errs;