From de9d218c43a1cda18103471d4de8932498db6061 Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Wed, 8 Jun 2022 14:55:02 -0400 Subject: [PATCH 1/3] Obtain the highest version of TLS supported by OpenSSL/TLS --- xCAT-test/autotest/testcase/install_xCAT/case0 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index e41499802..f473b099b 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -30,6 +30,10 @@ cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys check:output!~> cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys check:rc==0 + +# Obtain the highest version of TLS supported by OpenSSL/TLS. +cmd:openssl s_client --help 2>&1 | grep "\-tls1" | awk '{print $1}' | sort | tail -1 +check:rc==0 end start:install_xCAT_on_ubuntu @@ -76,4 +80,8 @@ cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys check:output!~> cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys check:rc==0 + +# Obtain the highest version of TLS supported by OpenSSL/TLS. +cmd:openssl s_client --help 2>&1 | grep "\-tls1" | awk '{print $1}' | sort | tail -1 +check:rc==0 end From da113964b17e6466dfdff7daa3cd29d05fb2673a Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Fri, 10 Jun 2022 10:30:59 -0400 Subject: [PATCH 2/3] Better file linking for xCAT-probe --- xCAT-probe/debian/xcat-probe.links | 1 - xCAT-probe/xCAT-probe.spec | 4 ---- xCAT-probe/xcatprobe | 13 +++++++++++++ 3 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 xCAT-probe/debian/xcat-probe.links diff --git a/xCAT-probe/debian/xcat-probe.links b/xCAT-probe/debian/xcat-probe.links deleted file mode 100644 index 8737b5e45..000000000 --- a/xCAT-probe/debian/xcat-probe.links +++ /dev/null @@ -1 +0,0 @@ -/opt/xcat/bin/xcatclient /opt/xcat/probe/subcmds/bin/switchprobe diff --git a/xCAT-probe/xCAT-probe.spec b/xCAT-probe/xCAT-probe.spec index 432c78213..847f8a4ab 100644 --- a/xCAT-probe/xCAT-probe.spec +++ b/xCAT-probe/xCAT-probe.spec @@ -71,10 +71,6 @@ if [ -e %{prefix}/probe/subcmds/bin/switchprobe ]; then else mkdir -p %{prefix}/probe/subcmds/bin/ fi -cd %{prefix}/probe/subcmds/bin/ -if [ -e %{prefix}/bin/xcatclient ]; then - ln -s %{prefix}/bin/xcatclient switchprobe -fi %preun #remove the bin directory if not on upgrade diff --git a/xCAT-probe/xcatprobe b/xCAT-probe/xcatprobe index 4116164a4..5a732c783 100755 --- a/xCAT-probe/xcatprobe +++ b/xCAT-probe/xcatprobe @@ -259,6 +259,19 @@ foreach my $attr (@tmpargv) { } } +# Create symlink /opt/xcat/probe/subcmds/bin/switchprobe -> /opt/xcat/bin/xcatclient if not already there +my $switchprobe_link = $plugin_dir."/bin/switchprobe"; +unless (-l $switchprobe_link) { + my $xcatclient = `which xcatclient`; + chomp($xcatclient); + if ($xcatclient) { + symlink($xcatclient, $switchprobe_link); + } + else { + print "Can not create symbolic link $switchprobe_link to xcatclient. xCAT-client package not installed.\n"; + exit 1; + } +} &loadsubcmds; if (defined($pluginname)) { From d5be83135e50642091a0f472255f383a0c065007 Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Fri, 10 Jun 2022 15:47:15 -0400 Subject: [PATCH 3/3] Revert PR 7193 - Need to find a better approach to extract supported host keys --- .../autotest/testcase/install_xCAT/case0 | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index f473b099b..c39f5cfd2 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -21,16 +21,6 @@ check:rc==0 check:output=~running cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 -# Check host keys supported by the operating system and report new ones, if any. -cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys -check:rc==0 -cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys -check:rc==0 -cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys -check:output!~> -cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys -check:rc==0 - # Obtain the highest version of TLS supported by OpenSSL/TLS. cmd:openssl s_client --help 2>&1 | grep "\-tls1" | awk '{print $1}' | sort | tail -1 check:rc==0 @@ -71,16 +61,6 @@ cmd:sleep 5 cmd:service goconserver status cmd:service conserver status -# Check host keys supported by the operating system and report new ones, if any. -cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys -check:rc==0 -cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys -check:rc==0 -cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys -check:output!~> -cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys -check:rc==0 - # Obtain the highest version of TLS supported by OpenSSL/TLS. cmd:openssl s_client --help 2>&1 | grep "\-tls1" | awk '{print $1}' | sort | tail -1 check:rc==0