components/puppet/patches/puppet-04-agent-auditing.patch
branchs11-update
changeset 3458 4912663e9858
parent 3455 6bba35ecb6b8
child 3459 e1b247c39c22
equal deleted inserted replaced
3455:6bba35ecb6b8 3458:4912663e9858
     1 Add auditing support to agent execution
       
     2 
       
     3 --- puppet-3.4.1/lib/puppet/agent.rb.orig	2013-03-08 16:03:45.000000000 -0700
       
     4 +++ puppet-3.4.1/lib/puppet/agent.rb	2013-03-08 16:03:45.000000000 -0700
       
     5 @@ -1,4 +1,7 @@
       
     6  require 'puppet/application'
       
     7 +if Facter.value(:osfamily) == "Solaris"
       
     8 +  require 'PuppetAudit'
       
     9 +end
       
    10  
       
    11  # A general class for triggering a run of another
       
    12  # class.
       
    13 @@ -35,6 +38,11 @@
       
    14        return
       
    15      end
       
    16  
       
    17 +    if Facter.value(:osfamily) == "Solaris"
       
    18 +        audit_handle = PuppetAudit.new
       
    19 +        audit_handle.audit_start
       
    20 +    end
       
    21 +
       
    22      result = nil
       
    23      block_run = Puppet::Application.controlled_run do
       
    24        splay
       
    25 @@ -50,6 +58,10 @@
       
    26            end
       
    27          end
       
    28        end
       
    29 +      if Facter.value(:osfamily) == "Solaris"
       
    30 +          audit_handle.audit_stop
       
    31 +          audit_handle.audit_teardown
       
    32 +      end
       
    33        true
       
    34      end
       
    35      Puppet.notice "Shutdown/restart in progress (#{Puppet::Application.run_status.inspect}); skipping run" unless block_run