Import debian 5.9p1-1
[openssh.git] / debian / patches / scp-quoting.patch
diff --git a/debian/patches/scp-quoting.patch b/debian/patches/scp-quoting.patch
new file mode 100644 (file)
index 0000000..239c1b5
--- /dev/null
@@ -0,0 +1,32 @@
+Description: Adjust scp quoting in verbose mode
+ Tweak scp's reporting of filenames in verbose mode to be a bit less
+ confusing with spaces.
+ .
+ This should be revised to mimic real shell quoting.
+Author: Nicolas Valcárcel <nvalcarcel@ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/89945
+Last-Update: 2010-02-27
+
+Index: b/scp.c
+===================================================================
+--- a/scp.c
++++ b/scp.c
+@@ -189,8 +189,16 @@
+       if (verbose_mode) {
+               fprintf(stderr, "Executing:");
+-              for (i = 0; i < a->num; i++)
+-                      fprintf(stderr, " %s", a->list[i]);
++              for (i = 0; i < a->num; i++) {
++                      if (i == 0)
++                              fprintf(stderr, " %s", a->list[i]);
++                      else
++                              /*
++                               * TODO: misbehaves if a->list[i] contains a
++                               * single quote
++                               */
++                              fprintf(stderr, " '%s'", a->list[i]);
++              }
+               fprintf(stderr, "\n");
+       }
+       if ((pid = fork()) == -1)