Permalink
Commits on Apr 10, 2012
Commits on Apr 4, 2012
Commits on Apr 3, 2012
  1. (#13260) Use mktmpdir when downloading packages

    pcarlisle authored and haus committed Mar 23, 2012
    This fixes a security vulnerability in the appdmg and pkgdmg providers where
    they would curl packages directly into /tmp and the install them, allowing an
    attacker to craft a symlink and overwrite arbitrary files or install arbitrary
    packages.
  2. Refactor pkgdmg specs

    pcarlisle authored and haus committed Mar 16, 2012
    Refactor to a more current spec style. Several of these specs didn't actually
    test anything. They have either been deleted or made more specific.
  3. Remove telnet Output_log parameter

    haus committed Apr 3, 2012
    The puppet telnet util opened an output log by default with a predictable name.
    This left the log open to a write-through symlink attack as the puppet user.
    This fix addresses that by removing the Output_log parameter from the
    Net::Telnet::new call. Without the parameter, Net::Telnet defaults to no output
    logging. The same is true for the dump_log parameter. The spec test for telnet
    has been updated to test and ensure that no files are opened during connect. It
    also stubs the TCPSocket for the telnet connection so that no connection is
    attempted if @transport.connect isn't stubbed.
  4. Fix for bucket_path security vulnerability

    zaphod42 authored and haus committed Apr 2, 2012
    This is a fix for Bugs #13553, #13418, #13511. The bucket_path parameter
    allowed control over where the filebucket will try to read and write to.
    The only place available to stop this parameter is in the resolution
    from a URI to an indirectory terminus. The bucket_path is used
    internally for local filebuckets and so cannot be removed completely
    without a larger change to the design.
  5. Removed text/marshal support

    zaphod42 authored and haus committed Apr 2, 2012
    Removing text/marshal support in order to close the security
    vulnerability described in Bug #13552.
Commits on Mar 12, 2012
  1. Update CHANGELOG for 2.7.12

    stahnma committed Mar 12, 2012
Commits on Mar 4, 2012
Commits on Mar 3, 2012
  1. (#7592) Remove redundant call to String#to_s

    joshcooper authored and haus committed Dec 7, 2011
    Previously, the augeas provider made calls like the following:
    
     @aug.get(key).to_s
    
    Since the Augeas#get method returns a String not an array, the to_s
    call is redundant. (Note the #match method does return an array.)
    
    The augeas tests were stubbing the #get method to return an array in
    some places (and a string in others). Prior to 1.9.2, ruby will
    automatically convert ["foo"].to_s to "foo", so everything worked as
    expected. However, under 1.9.2, ["foo"].to_s becomes "[\"foo\"]".
    
    These failures weren't noticed earlier, because our 1.9.2@allFeatures
    jenkins nodes do not have ruby-augeas installed. In other words, tests
    that require Puppet.features.augeas? were never running in
    Jenkins. The recent change to improve augeas testing, removed the
    dependency on this feature being installed, so these tests started
    failing.
    
    This commit just removes the redundant call to String#to_s, and
    updates the spec tests to match what the Augeas#get method really
    returns.
  2. (#11988) Work around Augeas reload bug when changing save modes

    Dominic Cleal authored and haus committed Mar 1, 2012
    After saving a file in one save mode and switching to another, Augeas realise
    to reload the file when Augeas#load is called again.  Work around this by
    explicitly reloading all files we saved while using the first save mode.
  3. (#11988) Don't overwrite symlinks in augeas provider

    nicklewis authored and haus committed Feb 9, 2012
    Previously, if not running with `force` set, we would try to write the
    file in SAVE_NEWFILE mode to create a <filename>.augnew file with the
    changes. We determined whether there were changes to be made based on
    that file (and used it to show a diff). When it came time to actually
    make the changes, we would simply move the .augnew file over the file
    being managed. Unfortunately, if the file being managed were a symlink,
    this would clobber it.
    
    There was a fallback path in the case of force (or older versions of
    augeas not supporting SAVE_NEWFILE) in which we would make the
    changes in SAVE_OVERWRITE mode as normal. Now, the behavior is a
    combination of the two; we still use SAVE_NEWFILE to determine whether
    changes need to be made and to show a diff, but then remove the .augnew
    file and always run again in SAVE_OVERWRITE mode to save the changes.
    This effectively delegates the behavior of preserving the file, etc.
    to augeas, so we don't duplicate effort or bugs.
  4. (#8312) Fix zypper provider so ensure => 'latest' now works

    kbarber authored and haus committed Feb 28, 2012
    Previously the regular expression to match the correct column from
    'zypper list-updates' was wrong, it seems to have been based on the command
    'zypper packages' instead. This was caused ensure => 'latest' to fail as the
    provider couldn't adequately figure out what newer versions were actually
    availabe.
    
    So I've fixed the regular expression (based on Felix Frank's patch) and updated
    the spec test so that it uses the real output from zypper list-updates and now
    references an external spec file, as apposed to referencing the content inline.
  5. Merge pull request #559 from cprice-puppet/bug/2.7.x/12844-agent-enab…

    haus committed Mar 3, 2012
    …le-doesnt-remove-old-lockfile
    
    Bug/2.7.x/12844 agent enable doesnt remove old lockfile
  6. (#12844) Fix a unit test relating to lockfiles

    cprice
    cprice committed Mar 3, 2012
    The recent changes to support backwards compatibility with 2.7.10
    and 2.7.11 introduced a very minor change in behavior with regards
    to when a stale lockfile gets cleaned up.  Fixed this test to
    recognize the change.
  7. Merge pull request #556 from joshcooper/ticket/2.7.x/12914-poll-child

    slippycheeze committed Mar 3, 2012
    (#12914) Allow puppet to be interrupted while waiting for child process
  8. Merge pull request #551 from cprice-puppet/bug/2.7.x/12844-agent-enab…

    slippycheeze committed Mar 3, 2012
    …le-doesnt-remove-old-lockfile
    
    Bug/2.7.x/12844 agent enable doesnt remove old lockfile
  9. (#12914) Allow puppet to be interrupted while waiting for child

    joshcooper committed Mar 2, 2012
    Previously, puppet on Windows could not be interrupted, e.g. Ctrl-C,
    while waiting for a child process it executed to exit. For example,
    when executing a pre/post run command.
    
    This commit changes puppet to poll the state of the child process'
    handle, sleeping for 1 second in between.
Commits on Mar 2, 2012
  1. (#12933) Better error message when agent is administratively disabled

    cprice
    cprice committed Mar 2, 2012
    Detect the difference between the cases where an agent run is
    aborted due to another agent run already in progress vs. being
    aborted due to the agent being administratively disabled via
    '--disable', and print a more useful message for the latter case.
  2. (#12844) Agent lockfiles: backwards compatibility with 2.7.10/2.7.11

    cprice
    cprice committed Mar 2, 2012
    In 2.7.10 there was a change in behavior introduced with regards
    to agent lockfiles.  Basically we split the concept of "an agent
    is currently running" apart from the concept of "the agent has
    been administratively disabled" by using 2 different lockfiles.
    
    That change was determined to have broken compatibility with
    mcollective, so it has been reverted as of 2.7.12.
    
    This commit provides backwards compatibility between 2.7.12+
    and 2.7.10/2.7.11 for cases where a user may have administratively
    disabled their agent and then upgraded to a newer version of puppet.
  3. Merge pull request #542 from jeffmccune/ticket/2.7rc/12881_fix_cron_m…

    slippycheeze committed Mar 2, 2012
    …issing_provider_error_message
    
    (#12881) Fix cron type default name error on windows
  4. Revert "Merge remote-tracking branch 'masterzen/tickets/2.7.x/3757' i…

    cprice
    cprice committed Mar 2, 2012
    …nto 2.7.x"
    
    This reverts commit 86a806f, reversing
    changes made to ac81771.
    
    See tickets #3757, #12844, #4836, #11057.  These changes were deemed to
    be breaking public APIs, and thus are being reverted from 2.7.x.  They'll
    be reintroduced in 3.x.
    
    (The changes in question were relating to how puppet agent creates /
    manages its lockfiles.)
    
    Conflicts:
    
    	lib/puppet/util/pidlock.rb
    	spec/unit/agent_spec.rb
    	spec/unit/util/pidlock_spec.rb
Commits on Mar 1, 2012
  1. Revert "(#12844) Backwards compatibility for 'puppet agent --enable'"

    cprice
    cprice committed Mar 1, 2012
    This reverts commit fcac8f7, which
    was a backwards-compatibility workaround intended to handle some new
    behavior related to puppet agent lockfiles that was introduced in
    2.7.10.  The fix is being reverted because we've decided to remove
    the new lockfile behavior from the 2.7.x series entirely, and push
    it out to 3.x.
Commits on Feb 29, 2012
  1. Merge pull request #540 from cprice-puppet/bug/2.7.x/12844-agent-enab…

    Chris Price
    Chris Price committed Feb 29, 2012
    …le-doesnt-remove-old-lockfile
    
    (#12844) Backwards compatibility for 'puppet agent --enable'
  2. (#12881) Fix cron type default name error on windows

    jeffmccune committed Feb 28, 2012
    On windows I ran into this error with the cron type:
    
        err: Failed to apply catalog: undefined method 'name' for nil:NilClass
    
    Without this patch, the problem appears to be that the cron type name
    parameter defaults to the following block:
    
        defaultto { Etc.getpwuid(Process.uid).name || "root" }
    
    On windows `Etc.getpwuid(Process.uid)` returns `nil`.  This patch fixes
    the problem by binding the object returned by
    `Etc.getpwuid(Process.uid)` to a variable.  We then check if the
    variable responds to the `name` method, and only send a message to name
    if so.  Otherwise, we return "root"
    
    The included spec test will fail if there is a regression in the desired
    behavior.  The expected failure looks like:
    
        Failures:
    
          1) Puppet::Type::Cron should default to user => root if Etc.getpwuid(Process.uid) returns nil (#12357)
             Failure/Error: entry = described_class.new(:name => "test_entry", :ensure => :present)
             NoMethodError:
               undefined method `name' for nil:NilClass
             # ./lib/puppet/type/cron.rb:359:in `default'
             # ./lib/puppet/type.rb:540:in `set_default'
             # ./lib/puppet/type.rb:1834:in `set_parameters'
             # ./lib/puppet/type.rb:1833:in `each'
             # ./lib/puppet/type.rb:1833:in `set_parameters'
             # ./lib/puppet/type.rb:1797:in `initialize'
             # ./spec/unit/type/cron_spec.rb:474:in `new'
             # ./spec/unit/type/cron_spec.rb:474
  3. (#12844) Backwards compatibility for 'puppet agent --enable'

    cprice
    cprice committed Feb 29, 2012
    In version 2.7.10 we changed the name of the lock file that is
    used by 'puppet agent --enable/--disable'.  A side effect is
    that if the lockfile was created under an older version of
    puppet, the "--enable" command in the newer versions won't
    delete the old lockfile and thus you can't run your agents.
    Make --enable attempt to detect and resolve this situation.
Commits on Feb 24, 2012
Commits on Feb 23, 2012
  1. Merge pull request #6 from pcarlisle/ticket/2.7.x/12572-last-run-summary

    haus committed Feb 23, 2012
    Ticket/2.7.x/12572 last run summary
  2. (#12572) Fix failing last run summary test on windows

    pcarlisle committed Feb 23, 2012
    This reverts the test to the previous version, which should work on all
    platforms. The test didn't work on windows since /dev/null isn't special.
  3. (#12188) Handle Win32 as well as Unix in pidfile tests.

    slippycheeze authored and haus committed Jan 28, 2012
    When I changed the testing for the PID file system I neglected to check that
    Win32 would work; this makes sure the path used is absolute for the platform
    the specs run on, fixing that problem.
    
    Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>