Skip to content

Commit e34d35c

Browse files
author
matclab
committed
Do not use PrintLastLog for Archlinux
Signed-off-by: matclab <[email protected]>
1 parent 61c7c9a commit e34d35c

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

molecule/ssh_hardening/verify.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
ansible.builtin.command: >
1111
docker run
1212
--volume /run/docker.sock:/run/docker.sock
13+
--volume ./waivers_{{ lookup('env', 'MOLECULE_DISTRO') }}.yaml:/waivers.yaml
1314
docker.io/cincproject/auditor exec
1415
-t docker://instance
1516
--no-show-progress --no-color
17+
--waiver-file /waivers.yaml
1618
--no-distinct-exit https://github.com/dev-sec/ssh-baseline/archive/refs/heads/master.zip
1719
register: test_results
1820
changed_when: false
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sshd-45:
2+
run: false
3+
justification: "PrintLastLog is unsupported on ArchLinux.

roles/ssh_hardening/templates/opensshd.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ UseDNS {{ 'yes' if (ssh_use_dns|bool) else 'no' }}
253253

254254
PrintMotd {{ 'yes' if (ssh_print_motd|bool) else 'no' }}
255255

256-
{% if ansible_facts.os_family != 'FreeBSD' %}
256+
{% if ansible_facts.os_family not in ('FreeBSD','Archlinux') %}
257257
PrintLastLog {{ 'yes' if (ssh_print_last_log|bool) else 'no' }}
258258
{% endif %}
259259

0 commit comments

Comments
 (0)