public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: darkdragon <darkdragon-001@web.de>
To: cygwin@cygwin.com
Subject: Problem with ssh-copy-id when home folder contains spaces
Date: Fri, 11 Mar 2016 21:38:00 -0000	[thread overview]
Message-ID: <CAAOCJVCuuRHmto0vbXJV5Xh4dgkj2ZTcg8m2f=dsMofFgoKHSQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 80 bytes --]

Some file paths were not correctly escaped. Fix attached ("ssh-copy-id.patch").

[-- Attachment #2: ssh-copy-id.patch --]
[-- Type: application/octet-stream, Size: 1073 bytes --]

diff --git a/usr/bin/ssh-copy-id.old b/usr/bin/ssh-copy-id
index afde8b1..bef5c95 100755
--- a/usr/bin/ssh-copy-id.old
+++ b/usr/bin/ssh-copy-id
@@ -233,17 +233,17 @@ populate_new_ids() {
             -o ControlPath=none \
             -o LogLevel=INFO \
             -o PreferredAuthentications=publickey \
-            -o IdentitiesOnly=yes "$@" exit 2>$L_TMP_ID_FILE.stderr </dev/null
+            -o IdentitiesOnly=yes "$@" exit 2>"$L_TMP_ID_FILE.stderr" </dev/null
         if [ "$?" = "$L_SUCCESS" ] ; then
-          : > $L_TMP_ID_FILE
+          : > "$L_TMP_ID_FILE"
         else
-          grep 'Permission denied' $L_TMP_ID_FILE.stderr >/dev/null || {
-            sed -e 's/^/ERROR: /' <$L_TMP_ID_FILE.stderr >$L_TMP_ID_FILE
+          grep 'Permission denied' "$L_TMP_ID_FILE.stderr" >/dev/null || {
+            sed -e 's/^/ERROR: /' <"$L_TMP_ID_FILE.stderr" >"$L_TMP_ID_FILE"
             cat >/dev/null #consume the other keys, causing loop to end
           }
         fi
 
-        cat $L_TMP_ID_FILE
+        cat "$L_TMP_ID_FILE"
       done
     }
   )

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

             reply	other threads:[~2016-03-11 21:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 21:38 darkdragon [this message]
2016-03-12 19:45 ` Corinna Vinschen
2016-03-13 11:37   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAOCJVCuuRHmto0vbXJV5Xh4dgkj2ZTcg8m2f=dsMofFgoKHSQ@mail.gmail.com' \
    --to=darkdragon-001@web.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).