~ubuntu-branches/ubuntu/trusty/puppet/trusty

« back to all changes in this revision

Viewing changes to .pc/puppet-12844/lib/puppet/agent/disabler.rb

  • Committer: Package Import Robot
  • Author(s): Tyler Hicks
  • Date: 2012-04-11 03:55:10 UTC
  • Revision ID: package-import@ubuntu.com-20120411035510-n0i86f5adri4b9g2
Tags: 2.7.11-1ubuntu2
* SECURITY UPDATE: Arbitrary file writes via predictable filename usage in
  appdmg and pkgdmg providers (LP: #978708)
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1906
* SECURITY UPDATE: Arbitrary file reads via Filebucket REST requests
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1986
* SECURITY UPDATE: Denial of service via Filebucket text/marshall support
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1987
* SECURITY UPDATE: Arbitrary code execution via Filebucket requests
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1988
* SECURITY UPDATE: Arbritrary file writes via predictable telnet output log
  filename
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1989
* debian/patches/puppet-12844: Re-fetch the patch from upstream since some
  missing pieces cause 'rake spec' to abort immediately

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require 'puppet/util/anonymous_filelock'
 
2
 
 
3
module Puppet::Agent::Disabler
 
4
  # Let the daemon run again, freely in the filesystem.
 
5
  def enable
 
6
    disable_lockfile.unlock
 
7
  end
 
8
 
 
9
  # Stop the daemon from making any catalog runs.
 
10
  def disable(msg='')
 
11
    disable_lockfile.lock(msg)
 
12
  end
 
13
 
 
14
  def disable_lockfile
 
15
    @disable_lockfile ||= Puppet::Util::AnonymousFilelock.new(lockfile_path+".disabled")
 
16
 
 
17
    @disable_lockfile
 
18
  end
 
19
 
 
20
  def disabled?
 
21
    disable_lockfile.locked?
 
22
  end
 
23
 
 
24
  def disable_message
 
25
    disable_lockfile.message
 
26
  end
 
27
end