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