--- puppet-3.8.3/lib/puppet/application/apply.rb.orig 2015-09-21 14:46:28.000000000 -0700
+++ puppet-3.8.3/lib/puppet/application/apply.rb 2015-12-01 10:21:17.911069347 -0800
@@ -1,6 +1,9 @@
require 'puppet/application'
require 'puppet/configurer'
require 'puppet/util/profiler/aggregate'
+if Facter.value(:osfamily) == "Solaris"
+ require 'PuppetAudit'
+end
class Puppet::Application::Apply < Puppet::Application
@@ -217,6 +220,12 @@
end
begin
+ # configure auditing on Solaris
+ if Facter.value(:osfamily) == "Solaris"
+ audit_handle = PuppetAudit.new
+ audit_handle.audit_start
+ end
+
# Compile our catalog
starttime = Time.now
catalog = Puppet::Resource::Catalog.indirection.find(node.name, :use_node => node)
@@ -245,6 +254,12 @@
rescue => detail
Puppet.log_exception(detail)
exit(1)
+ ensure
+ # clean up auditing records on Solaris
+ if Facter.value(:osfamily) == "Solaris"
+ audit_handle.audit_stop
+ audit_handle.audit_teardown
+ end
end
end