mirror of
https://github.com/saltstack-formulas/openssh-formula.git
synced 2026-05-24 21:16:43 +02:00
Debian: Create privilege separation directory
On Debian-based system, the privilege separation directory is `/run/sshd`. Since `/run` is a tmpfs filesystem, the init script is responsible for creating the directory when starting `sshd`. However, this directory might not exist if the `ssh` service has not been started yet. This patch ensures that the directory exists before storing the configuration file. It is required to prevent the `check_cmd` from failing; specifically, to prevent `sshd` from complaining that the directory does not exist.
This commit is contained in:
parent
6e077f5dbe
commit
4c822ba844
@ -6,6 +6,16 @@ include:
|
|||||||
- openssh
|
- openssh
|
||||||
|
|
||||||
{% if manage_sshd_config %}
|
{% if manage_sshd_config %}
|
||||||
|
{% if 'Debian' == salt['grains.get']('os_family') %}
|
||||||
|
/run/sshd:
|
||||||
|
file.directory:
|
||||||
|
- user: 0
|
||||||
|
- group: 0
|
||||||
|
- mode: 0755
|
||||||
|
- require_in:
|
||||||
|
- file: sshd_config
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
sshd_config:
|
sshd_config:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: {{ openssh.sshd_config }}
|
- name: {{ openssh.sshd_config }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user