[Bash-completion-commits] [SCM] bash-completion branch, master, updated. a9994ac15f29892a27ebfff6ded63930a43f1187
David Paleino
d.paleino at gmail.com
Mon Apr 13 15:11:08 UTC 2009
The following commit has been merged in the master branch:
commit a9994ac15f29892a27ebfff6ded63930a43f1187
Author: David Paleino <d.paleino at gmail.com>
Date: Mon Apr 13 17:10:41 2009 +0200
Remove eval() and sed quoting in _known_hosts() (Alioth: #311595)
Fixes execution (!!!) of hosts specified by {Global,User}KnownHosts
in SSH config files.
diff --git a/CHANGES b/CHANGES
index 2ff9131..7e6d053 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ bash-completion (1.x)
[ David Paleino ]
* Permit .gz files concatenation (Debian: #514377)
+ * Remove eval() and sed quoting in _known_hosts(), fixes execution (!!!)
+ of hosts specified by {Global,User}KnownHosts in SSH config files
+ (Alioth: #311595)
[ Ville Skyttä ]
* Split yum and yum-arch completion into contrib/yum.
diff --git a/bash_completion b/bash_completion
index 688adbd..6567889 100644
--- a/bash_completion
+++ b/bash_completion
@@ -2680,9 +2680,9 @@ _known_hosts()
if [ ${#config[@]} -gt 0 ]; then
# expand path (if present) to global known hosts file
- global_kh=$( eval echo "$( sed -ne 's/^[ \t]*[Gg][Ll][Oo][Bb][Aa][Ll][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" )" )
+ global_kh=$( echo $( sed -ne 's/^[ \t]*[Gg][Ll][Oo][Bb][Aa][Ll][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" ) )
# expand path (if present) to user known hosts file
- user_kh=$( eval echo "$( sed -ne 's/^[ \t]*[Uu][Ss][Ee][Rr][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" )" )
+ user_kh=$( echo $( sed -ne 's/^[ \t]*[Uu][Ss][Ee][Rr][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" ) )
fi
# Global known_hosts files
--
bash-completion
More information about the Bash-completion-commits
mailing list