Add stdin parsing to puppet parser validate
(#11727) Support STDIN for `puppet parser validate`

This adds an acceptance test for the STDIN validation feature of the `puppet
parser validate` action.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#15731) Full certificate metadata for pson

When attempting to get certificate metadata using the REST API, the API
returns a different set of metadata based on whether one requests yaml
or pson, neither of which are the full set of metadata.
This commit adds dns_alt_names/subjectAltNames to the metadata for pson.
(#15731) explicit fingerprint digest for pson

The pson metadata for a certificate (or certificate request) contains a
fingerprint which was created with the default digest algorithm. This
algorithm must change as we move to FIPS 140-2 compliance because MD5 is
explicitly denied.
This commit includes fingerprint metadata for 3 stronger hashing
algorithms and explicitly calls out that the fingerprint is for that
algorithm.
(#16139) Provide accessors for @puppet_version and @report_format in
reports

Prior to this commit, some of the data that was useful / necessary
to write a complete report processor was only accessible via
instance variables, while the vast majority of the data was available
through accessor methods.  This commit simply adds accessors for
puppet_version and report_format so that authors of report processors
aren't forced to interact with instance variables.  This should
make report processor implementation a bit more consistent, and
provides a little bit of abstraction from the underlying implementation
details.
(#15731) Move explicit fingerprints to hash

Move the explicit fingerprints for certificates and certificate requests
to a hash within the normal pson data. This commit makes the format of
the pson:
{
  ...
  fingerprint: <current fingerprint algorithm>
  fingerprints: {
    default: <current fingerprint algorithm>
    SHA1: <sha1 fingerprint>
    SHA256: <sha256 fingerprint>
    SHA512: <sha512 fingerprint>
  }
}

Clean up the tests to reduce duplication and improve clarity of what is
actually being tested in each case.
(#15560) Refactor LogonUser

Previously, the ADSI utility code validated a user's password by
attempting a network logon session as that user. However, the ability to
create a logon session and use the resulting process token is something
that is generally useful, in say the next commit.

This commit refactors the call to `LogonUser`, adds a helper method for
checking the validity of a password, and modifies the ADSI code to call
it.

The call to `LogonUser` remains the same except that the MSDN docs say to
specify a '.' as the domain for local user accounts, and we null out the
token handle prior to calling LogonUser instead setting it to
"\x20\x20\x20\x20" which could be interpreted as a valid handle.
(#15560) Create the user's profile if managehome is true

Previously, specifying `managehome => true` on a user resource would have
no effect even though the Windows ADSI user provider claimed to support
the `manages_homedir` feature.

On Windows, a user's homedir (profile) is not created when the user
account is created, but when the user logs in for the first time. As
a result, if Puppet created the user account, and then tried to apply
another resource that depended on the existence of the user's home
directory, such as ssh keys, then Puppet would fail.

This commit changes the Windows ADSI user provider such that if
`managehome` is enabled, then it will load and unload the user's profile.
This will create the profile if necessary and apply the appropriate DACL
to the profile and subdirectories.

This commit follows the Microsoft recommended way of creating a user
profile: http://support.microsoft.com/kb/196070/en-us
(#16058) Add setting to configure catalog cache

This adds a setting to configure the cache terminus used by the catalog
indirection. The two reasonable values at this time are "yaml" and "pson".
(#16058) Set pson as default catalog cache format

Serializing as pson appears to be faster, so set it as the default. Yaml is
still available by setting catalog_cache_terminus.
Add a terminus setting type

The terminus setting type makes it possible to set a terminus to nil by
providing an empty string in the configuration. It also converts the terminus
name to a symbol automatically.

This required making all terminus settings consistently use symbols.
(maint) commit the complete commands at the end.

The provider.flush() comamnd was missing.
(#15560) Delete user's profile after deleting account

Previously, if Puppet deleted a user account and `managehome` was true,
then Puppet would leave behind the user profile on disk, e.g.
C:\Users\%USERNAME%.

In keeping with the semantics of the `manage_homedir` feature, this commit
modifies the Windows ADSI user provider to delete the user profile when
`managehome` is true.

On systems before Vista SP1, the Win32_UserProfile class does not exist.
Worse, there is no reliable and built-in way to delete user profiles.
There is the widely used delprof.exe utility included in the 2003 Resource
Kit, but it's not part of the core OS and it doesn't work in later
versions of Windows.

As a result, the Windows ADSI provider will make a best effort to delete
the user profile, and that should work on Vista SP1 and later systems. On
earlier systems, we will warn that it's not supported.

This commit also adds an acceptance test to verify the home directory
gets created, and deleted (on systems that support it).
(#16119) Recognize carriage return escape sequence

Previously, the lexer would issue a warning when encountering a carriage
return escape sequence \r. Such as when specifying file content in a
manifest. This commit modifies the lexer to accept \r.
(#16019) Don't add Unix paths to Windows search path

Previously, we were adding `/usr/sbin` and `/sbin` to Puppet's shell
search path on all platforms, including Windows.

This commit changes the behavior on Windows so that those paths are not
added. It also doesn't add Windows equivalents, because the environment
it inherits from its parent process already contains a suitable search
path.

This commit also sets File::PATH_SEPARATOR appropriately when using the
windows or posix shared context.
Merge pull request #1094 from vrthra/ticket/3.x/15886_refactor_zones

(maint) commit the complete commands at the end.
Merge pull request #1088 from joshcooper/ticket/2.7.x/15560-managehome-windows

(#15560) Implement manages_homedir semantics on Windows
Merge branch '2.7.x' into 3.x

* 2.7.x:
  (#15560) Delete user's profile after deleting account
  (#15560) Create the user's profile if managehome is true
  (#15560) Refactor LogonUser
(#16175) Touch filebuckets contents when we get a new path

Touch the contents file when we get a new path for the file. This
simplifies cleanup scripts for deleting old filebucket files for
example.
Merge branch 'feature/3.x/16175-update-modification-time-on-filebucket-contents' into 3.x