summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Quatravaux <dominique.quatravaux@epfl.ch>2016-12-15 09:37:00 +0100
committerMichael Albinus <michael.albinus@gmx.de>2016-12-15 09:37:00 +0100
commitd381db25a201fa67b7e274a758d6a7c2c350067e (patch)
tree8436d0f181426a669d8328a24042204711fbfe3d
parent0a5898c3dd2e32431268bc2bcf3536d4cd62ad39 (diff)
downloademacs-d381db25a201fa67b7e274a758d6a7c2c350067e.tar.gz
Protect environment variables with double quotes in Tramp
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Protect environment variables with double quotes. Copyright-paperwork-exempt: yes
-rw-r--r--lisp/net/tramp-sh.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 419dccb47e0..31ef2efbf20 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4201,10 +4201,11 @@ process to set up. VEC specifies the connection."
(when vars
(tramp-send-command
vec
- (format "while read var val; do export $var=$val; done <<'%s'\n%s\n%s"
- tramp-end-of-heredoc
- (mapconcat 'identity vars "\n")
- tramp-end-of-heredoc)
+ (format
+ "while read var val; do export $var=\"$val\"; done <<'%s'\n%s\n%s"
+ tramp-end-of-heredoc
+ (mapconcat 'identity vars "\n")
+ tramp-end-of-heredoc)
t))
(when unset
(tramp-send-command