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.
(#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.
(#15591) Skip test that causes segfault on Windows

Previously, this test would segfault on Windows with ruby 1.8.7 p370, but
not p334. The test can never work on Windows as currently written
(Kernel.fork). And we can't mark it as pending, because rspec attempts to
run the test, expecting either a failure or exception, but ruby segfaults.
So we have to skip entirely on Windows.

Note in the merge up to 3.x, this spec file has been removed.
Maint: Large or complex HEREDOC strings w/ no interpolation should be single-quote type

We were getting accidental interpolation of \t and \n sequences in the desc string
for the file type's content parameter. To avoid this, any description string which:

* Does not deliberately interpolate values from the surrounding code

AND

* Is long enough or complex enough that it can't be read in a single glance

...should probably be the single-quoted type of HEREDOC instead of the
double-quoted type. This commit changes a bunch of HEREDOCs that match this
description.
(#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
(#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).
Add yaml files
Switch off building gem for 2.7.x

The 2.7 series packages binaries in sbin which is not
compatible with gems. We'll use the existing gem task
for gems rather than packaging repo because it hacks
around this already.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(#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.
Move redhat spec file to erb template in ext/redhat
Add debian packaging artifacts and template
Move and template all apple pkging artifacts to ext/osx

Also add a file_mapping.yaml file for apple packaging.
Fixup Rakefile to use packaging repo
Add in manpage listings that should have been there
Remove broken dual build-requires of facter in redhat spec