From dc840e33363dff625e580f6e24fd98b6691cc3bb Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Mon, 21 Oct 2024 18:09:05 -0400 Subject: [PATCH] Misc fixes (#181) * fix: handle process shutdown with limited permissions Certain platforms like Android do not have permission to list all child processes. In this instance, just continue * remove dsa keys from test setup DSA has been removed from openssh for some time now, and this causes running tests on newer machines to fail --------- Co-authored-by: David Murphy --- src/saltfactories/daemons/sshd.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/saltfactories/daemons/sshd.py b/src/saltfactories/daemons/sshd.py index 1d2dde54..e60378d9 100644 --- a/src/saltfactories/daemons/sshd.py +++ b/src/saltfactories/daemons/sshd.py @@ -156,8 +156,6 @@ def _write_config(self): config_lines.append(f"{key} {value}\n") # Let's generate the host keys - if platform.is_fips_enabled() is False: - self._generate_server_dsa_key() self._generate_server_ecdsa_key() self._generate_server_ed25519_key() for host_key in pathlib.Path(self.config_dir).glob("ssh_host_*_key"): @@ -184,17 +182,6 @@ def _generate_client_ecdsa_key(self): key_path.chmod(0o0400) return key_path_prv - def _generate_server_dsa_key(self): - key_filename = "ssh_host_dsa_key" - key_path_prv = self.config_dir / key_filename - key_path_pub = self.config_dir / f"{key_filename}.pub" - if key_path_prv.exists() and key_path_pub.exists(): - return key_path_prv - self._ssh_keygen(key_filename, "dsa", "1024") - for key_path in (key_path_prv, key_path_pub): - key_path.chmod(0o0400) - return key_path_prv - def _generate_server_ecdsa_key(self): key_filename = "ssh_host_ecdsa_key" key_path_prv = self.config_dir / key_filename