(packaging) Update PUPPETVERSION to 3.2.0
Merge branch 'release_3.2.0' into stable
(#11108) Make the pkgdmg provider able to install a remote flat pkg file

Without this patch applied when the pkgdmg provider is used to install a remote flat pkg file, the installation fails. This is becasue the installer expect a file with the .pkg extension and the curl command used to download the remote package set as output a filename without any extension. This patch fixes the problem by adding the correct extension to the curl output parameter.
(#20726) Add user managehome acceptance tests

There were no acceptance tests covering the behavior of user providers
when managing home directories.

This commit adds two acceptance tests, one for testing when the home
directory is managed, and one test when the home directory is no longer
being managed.

Paired-with: Josh Cooper <josh@puppetlabs.com>
Revert "Merge branch 'pull-1512'"

This reverts commit 9c22753eee23db85fb9a3774d25b26a468db8d7e, reversing
changes made to cb9927f49fd1512720177ad77395a1586f86cbd1.

This commit is being reverted because #20726 revealed a bug with the new
managehome home behavior of useradd.
(#11108) Test coverage for remote pkg file

The current implementation of tests for the pkgdmg provider only test
the behavior for packages without a file extension if they're being
installed locally. This commit adds tests for remote pkgs so that if a
file extension is not given in the package tile, it's extracted from the
package source.
(static compiler) Add method documentation

The static compiler doesn't have much documentation around the various
methods and the method signatures. This commit adds basic documentation
for method signatures and the purpose of methods.
(#20726) Include password for useradd managehome tests on windows

The new acceptence tests for managing the home directory fails on
Windows because windows requires a sufficiently complex password to be
specified when creating the home directory.

With that said, managing the home directory is broken on windows with
ruby 1.9 (#20768). This marks the test as pending when not running ruby
1.8.

Paired-with: Josh Cooper <josh@puppetlabs.com>
(#20726) Manage home has issues on Solaris

On Solaris, executing `usermod -d dir username` where dir is the user's
home directory as reported by `puppet resource user username` will fail
with the error:

    UX: useradd: ERROR: Path must not start with '/home/'

It appears the new directory must be of the form
'/export/home/username'. Since this issue is unrelated to #20726, I'm
marking this test as pending on Solaris.
(Maint) Give each test a meaningful name

The tests being put all together did not provide any explanation about
what was interesting about each situation. This obscures other
interesting cases that may not be covered and also provides little to no
specification to later developers who may need to know what the cases
being handled are.
Merge branch 'ticket/stable/20726-usermod-command-arguments-out-of-order' into stable

* ticket/stable/20726-usermod-command-arguments-out-of-order:
  (#20726) Manage home has issues on Solaris
  (#20726) Include password for useradd managehome tests on windows
  Revert "Merge branch 'pull-1512'"
  (#20726) Add user managehome acceptance tests
Merge branch 'pull-1648'

This closes GH-1648
(#20742) Handle DNs that cannot be parsed

When no DN is sent in a RACK setup (passenger behind apache), the DN
that the master sees for unauthenticated requests ends up being the
string "(null)". The openssl name parsing functions do not handle data
that doesn't look like a DN in a useful manner. If the string to be
parsed as a DN does not contain an equals sign ("="), then it will fail
with an error like:

  TypeError: can't convert nil into String
  # ./lib/puppet/util/ssl.rb:26:in `call'
  # ./lib/puppet/util/ssl.rb:26:in `block in subject_from_dn'
  # ./lib/puppet/util/ssl.rb:24:in `each'
  # ./lib/puppet/util/ssl.rb:24:in `subject_from_dn'

This same code also would fail with a OpenSSL::X509::NameError if the
parsed DN contained an unknown part (RDN), e.g. "no=yes".

This commit fixes the malformed DN by checking that the DN contains at
least an equals sign before trying to parse. It also then handles all
OpenSSL::X509::NameError problems.
(#6371) Update lastchg field when updating password

On Solaris the password= method updates the `/etc/shadow` file directly
to set the new password but it does not update the `lastchg` field to
the current day. This way a password can expire even though it was
updated with puppet.

The fix was first supplied in commit 6ef1d3a but was later removed after
a refactor in 7900a66.
(#20742) Only use certifcate info if there is a CN

Because of the changes to puppet/util/ssl for this issue, the DN
was now always able to be parsed into something. This uncovered that the
logic around deciding on the node name and authentication status for the
request was incorrectly based off of simply the existance of a DN in the
headers. This caused a DN that was missing a CN to have an unknown node
for a request, which could be marked as authenticated if the verify
header was "SUCCESS".

This patch fixes it by basing the decision of using the SSL headers on
the existance of the CN instead of the DN. Now a CN must be present
(e.g. a valid DN) for the verify header to be used. When no CN is
present, then it is treated the same as no DN being present, which
causes a reverse DNS lookup to be done for the node name.
Merge branch 'stschulte-ticket/stable/6371_reset_lastchg_on_solaris'

* stschulte-ticket/stable/6371_reset_lastchg_on_solaris:
  (#6371) Update lastchg field when updating password
Merge pull request #1652 from adrienthebo/maint-static_compiler_yardoc

(static compiler) Add method documentation
Merge remote-tracking branch 'zaphod42/issue/stable/20742-no-handling-of-bad-dn-in-rack' into stable

* zaphod42/issue/stable/20742-no-handling-of-bad-dn-in-rack:
  (#20742) Only use certifcate info if there is a CN
  (#20742) Handle DNs that cannot be parsed
  (Maint) Give each test a meaningful name
Merge branch 'stable'

* stable:
  (#20742) Only use certifcate info if there is a CN
  (#20742) Handle DNs that cannot be parsed
  (Maint) Give each test a meaningful name
  (#20726) Manage home has issues on Solaris
  (#20726) Include password for useradd managehome tests on windows
  Revert "Merge branch 'pull-1512'"
  (#20726) Add user managehome acceptance tests
  (packaging) Update PUPPETVERSION to 3.2.0
Merge branch 'master' of https://github.com/puppetlabs/puppet