components/puppet/patches/puppet-04-agent-auditing.patch
author Drew Fisher <drew.fisher@oracle.com>
Wed, 22 Jan 2014 15:55:22 -0700
changeset 1655 2490bf4f53ea
parent 1474 97927b6c1ece
permissions -rw-r--r--
PSARC 2013/426 Puppet 3.4.1 18010461 problem in UTILITY/PUPPET 18010466 Update Puppet to 3.4.1

Add auditing support to agent execution

--- puppet-3.4.1/lib/puppet/agent.rb.orig	2013-03-08 16:03:45.000000000 -0700
+++ puppet-3.4.1/lib/puppet/agent.rb	2013-03-08 16:03:45.000000000 -0700
@@ -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.
@@ -35,6 +38,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
@@ -50,6 +58,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