Skip to content

Commit

Permalink
ListenAddress should exist (#165)
Browse files Browse the repository at this point in the history
* ListenAddress should exist

There can be multiple ListenAddress (for instance ipv6 and ipv4 failover).

Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>

* ListenAddress should be set

Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>

* test for more nil variants

Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>

* fix

Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>
  • Loading branch information
micheelengronne authored May 20, 2020
1 parent 0ec061f commit 0932d5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controls/sshd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
title 'Server: Specify ListenAddress'
desc "Limit the SSH server to listen to a specific address. Don't let it listen on all interfaces to avoid logins from unexpected sources."
describe sshd_config(sshd_custom_path + '/sshd_config') do
its('ListenAddress') { should match(/.*/) }
its('ListenAddress') { should_not eq nil }
its('ListenAddress') { should_not match(/^\s*$/) }
its('ListenAddress') { should_not eq [] }
end
end

Expand Down

0 comments on commit 0932d5f

Please sign in to comment.