Add auditing support to agent execution
--- puppet-3.6.2/lib/puppet/agent.rb.orig 2014-06-18 09:30:30.571283131 -0600
+++ puppet-3.6.2/lib/puppet/agent.rb 2014-06-16 10:47:24.851029500 -0600
@@ -1,4 +1,7 @@
require 'puppet/application'
+if Facter.value(:osfamily) == "Solaris"
+ require 'PuppetAudit'
+end
# A general class for triggering a run of another
# class.
@@ -37,6 +40,11 @@
return
end
+ if Facter.value(:osfamily) == "Solaris"
+ audit_handle = PuppetAudit.new
+ audit_handle.audit_start
+ end
+
result = nil
block_run = Puppet::Application.controlled_run do
splay client_options.fetch :splay, Puppet[:splay]
@@ -52,6 +60,10 @@
end
end
end
+ if Facter.value(:osfamily) == "Solaris"
+ audit_handle.audit_stop
+ audit_handle.audit_teardown
+ end
true
end
Puppet.notice "Shutdown/restart in progress (#{Puppet::Application.run_status.inspect}); skipping run" unless block_run