File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 10
10
end
11
11
12
12
case facts [ :os ] [ 'family' ]
13
+ when 'Suse'
14
+ context 'on Suse based systems' do
15
+ it {
16
+ is_expected . to contain_file ( 'security.conf' )
17
+ . with_content ( %r{^\s +SecTmpDir /var/lib/mod_security$} )
18
+ }
19
+ end
13
20
when 'RedHat'
14
21
context 'on RedHat based systems' do
15
22
it {
42
49
. with_content ( %r{^\s +SecAuditLogType Serial$} )
43
50
. with_content ( %r{^\s +SecDebugLog /var/log/httpd/modsec_debug.log$} )
44
51
. with_content ( %r{^\s +SecAuditLog /var/log/httpd/modsec_audit.log$} )
52
+ . with_content ( %r{^\s +SecTmpDir /var/lib/mod_security$} )
45
53
}
46
54
it {
47
55
is_expected . to contain_file ( '/etc/httpd/modsecurity.d' ) . with (
211
219
. with_content ( %r{^\s +SecAuditLogType Serial$} )
212
220
. with_content ( %r{^\s +SecDebugLog /var/log/apache2/modsec_debug.log$} )
213
221
. with_content ( %r{^\s +SecAuditLog /var/log/apache2/modsec_audit.log$} )
222
+ . with_content ( %r{^\s +SecTmpDir /var/cache/modsecurity$} )
214
223
}
215
224
it {
216
225
is_expected . to contain_file ( '/etc/modsecurity' ) . with (
Original file line number Diff line number Diff line change 54
54
<%- end -%>
55
55
SecArgumentSeparator &
56
56
SecCookieFormat 0
57
- <%- if scope [ 'os:: family' ] == 'Debian' -%>
57
+ <%- if scope [ 'facts' ] [ 'os' ] [ ' family'] == 'Debian' -%>
58
58
SecDebugLog <%= @logroot %> /modsec_debug.log
59
59
SecAuditLog <%= @logroot %> /modsec_audit.log
60
60
SecTmpDir /var/cache/modsecurity
61
61
SecDataDir /var/cache/modsecurity
62
62
SecUploadDir /var/cache/modsecurity
63
- <%- elsif scope [ 'os:: family' ] == 'Suse' -%>
63
+ <%- elsif scope [ 'facts' ] [ 'os' ] [ ' family'] == 'Suse' -%>
64
64
SecDebugLog /var/log/apache2/modsec_debug.log
65
65
SecAuditLog /var/log/apache2/modsec_audit.log
66
66
SecTmpDir /var/lib/mod_security
Original file line number Diff line number Diff line change 1
- <% if scope['os:: family'] == 'Redhat' and scope['os:: release:: major'].to_i <= 7 -%>
1
+ <% if scope['facts']['os'][' family'] == 'Redhat' and scope['facts']['os'][' release'][' major'].to_i <= 7 -%>
2
2
# ---------------------------------------------------------------
3
3
# Core ModSecurity Rule Set ver.2.2.9
4
4
# Copyright (C) 2006-2012 Trustwave All rights reserved.
You can’t perform that action at this time.
0 commit comments