mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
account for the fact that CentOS Stream 9 stores sftp-server in a different location
This commit is contained in:
parent
6dd26a1b8d
commit
78bd717aea
1 changed files with 3 additions and 1 deletions
|
@ -1189,7 +1189,7 @@ def sshd_config_dir(salt_factories):
|
|||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def sshd_server(salt_factories, sshd_config_dir, salt_master):
|
||||
def sshd_server(salt_factories, sshd_config_dir, salt_master, grains):
|
||||
sshd_config_dict = {
|
||||
"Protocol": "2",
|
||||
# Turn strict modes off so that we can operate in /tmp
|
||||
|
@ -1220,6 +1220,8 @@ def sshd_server(salt_factories, sshd_config_dir, salt_master):
|
|||
"Subsystem": "sftp /usr/lib/openssh/sftp-server",
|
||||
"UsePAM": "yes",
|
||||
}
|
||||
if grains["os"] == "CentOS Stream" and grains["osmajorrelease"] == 9:
|
||||
sshd_config_dict["Subsystem"] = "sftp /usr/libexec/openssh/sftp-server"
|
||||
factory = salt_factories.get_sshd_daemon(
|
||||
sshd_config_dict=sshd_config_dict,
|
||||
config_dir=sshd_config_dir,
|
||||
|
|
Loading…
Add table
Reference in a new issue