mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
Merge pull request #147 from chef/auditd_name
Merged change edd21e7f-f677-4f04-bcc1-2000bcf79663 From review branch auditd_name into master Signed-off-by: drichter <drichter@chef.io>
This commit is contained in:
commit
ecc731dab1
4 changed files with 4 additions and 4 deletions
|
@ -14,7 +14,7 @@ require 'utils/simpleconfig'
|
||||||
# end
|
# end
|
||||||
|
|
||||||
class AuditDaemonConf < Vulcano.resource(1)
|
class AuditDaemonConf < Vulcano.resource(1)
|
||||||
name 'audit_daemon_conf'
|
name 'auditd_conf'
|
||||||
|
|
||||||
def initialize(path = nil)
|
def initialize(path = nil)
|
||||||
@conf_path = path || '/etc/audit/auditd.conf'
|
@conf_path = path || '/etc/audit/auditd.conf'
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# end
|
# end
|
||||||
|
|
||||||
class AuditDaemonRules < Vulcano.resource(1)
|
class AuditDaemonRules < Vulcano.resource(1)
|
||||||
name 'audit_daemon_rules'
|
name 'auditd_rules'
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@content = vulcano.command('/sbin/auditctl -l').stdout.chomp
|
@content = vulcano.command('/sbin/auditctl -l').stdout.chomp
|
||||||
|
|
|
@ -7,7 +7,7 @@ require 'vulcano/resource'
|
||||||
|
|
||||||
describe 'Vulcano::Resources::AuditDaemonConf' do
|
describe 'Vulcano::Resources::AuditDaemonConf' do
|
||||||
it 'check audit daemon config parsing' do
|
it 'check audit daemon config parsing' do
|
||||||
resource = MockLoader.new(:windows).load_resource('audit_daemon_conf')
|
resource = MockLoader.new(:windows).load_resource('auditd_conf')
|
||||||
_(resource.space_left_action).must_equal 'SYSLOG'
|
_(resource.space_left_action).must_equal 'SYSLOG'
|
||||||
_(resource.action_mail_acct).must_equal 'root'
|
_(resource.action_mail_acct).must_equal 'root'
|
||||||
_(resource.tcp_listen_queue).must_equal '5'
|
_(resource.tcp_listen_queue).must_equal '5'
|
||||||
|
|
|
@ -7,7 +7,7 @@ require 'vulcano/resource'
|
||||||
|
|
||||||
describe 'Vulcano::Resources::AuditDaemonRules' do
|
describe 'Vulcano::Resources::AuditDaemonRules' do
|
||||||
it 'check audit policy parsing' do
|
it 'check audit policy parsing' do
|
||||||
resource = MockLoader.new(:windows).load_resource('audit_daemon_rules')
|
resource = MockLoader.new(:windows).load_resource('auditd_rules')
|
||||||
_(resource.send('LIST_RULES')).must_equal [
|
_(resource.send('LIST_RULES')).must_equal [
|
||||||
'exit,always syscall=rmdir,unlink',
|
'exit,always syscall=rmdir,unlink',
|
||||||
'exit,always auid=1001 (0x3e9) syscall=open',
|
'exit,always auid=1001 (0x3e9) syscall=open',
|
||||||
|
|
Loading…
Reference in a new issue