Blame SOURCES/0204-ssh-client-handle-etc-ssh-ssh_config.patch

a56a5e
From 828fd83bc1816bacb24b13106f935b2fbd0964a4 Mon Sep 17 00:00:00 2001
a56a5e
From: Harald Hoyer <harald@redhat.com>
a56a5e
Date: Fri, 29 Aug 2014 14:06:57 +0200
a56a5e
Subject: [PATCH] ssh-client: handle /etc/ssh/ssh_config
a56a5e
a56a5e
- disable ProxyCommand
a56a5e
- install the GlobalKnownHostsFile
a56a5e
a56a5e
https://bugzilla.redhat.com/show_bug.cgi?id=1086778
a56a5e
---
a56a5e
 modules.d/95ssh-client/module-setup.sh | 10 +++++++++-
a56a5e
 1 file changed, 9 insertions(+), 1 deletion(-)
a56a5e
a56a5e
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
a56a5e
index 66e5307..f60e963 100755
a56a5e
--- a/modules.d/95ssh-client/module-setup.sh
a56a5e
+++ b/modules.d/95ssh-client/module-setup.sh
a56a5e
@@ -41,7 +41,15 @@ inst_sshenv()
a56a5e
 
a56a5e
     # Copy over root and system-wide ssh configs.
a56a5e
     [[ -f /root/.ssh/config ]] && inst_simple /root/.ssh/config
a56a5e
-    [[ -f /etc/ssh/ssh_config ]] && inst_simple /etc/ssh/ssh_config
a56a5e
+    if [[ -f /etc/ssh/ssh_config ]]; then
a56a5e
+        inst_simple /etc/ssh/ssh_config
a56a5e
+        sed -i -e 's/\(^[[:space:]]*\)ProxyCommand/\1# ProxyCommand/' ${initdir}/etc/ssh/ssh_config
a56a5e
+        while read key val; do
a56a5e
+            [[ key != "GlobalKnownHostsFile" ]] && continue
a56a5e
+            inst_simple "$val"
a56a5e
+            break
a56a5e
+        done < /etc/ssh/ssh_config
a56a5e
+    fi
a56a5e
 
a56a5e
     return 0
a56a5e
 }