Ensure the year in the module template is correct.

Previous to this commit the year in the `puppet module generate`
template was hard-coded to be 2011. Since it is not 2011 anymore, this
is problematic.

This commit addresses this by calling Time.now.year inside the erb
template.

Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
Merge pull request #1228 from stahnma/fix_module_tool_year_template

Ensure the year in the module template is correct.
(#16581) Refactor code for converting string and binary sids

This commit moves the methods that were previously part of the security
module into a sid module, and adds tests that only execute on windows due
to its reliance on the `win32/security` gem.
(#16581) Use win32-security gem to resolve SIDs

This commit adds methods for resolving Windows account names into binary
encoded SIDs and back. Account names may be specified with or without the
domain component, or as a SID string. So all of the following are
equivalent names for the LocalSystem account:

    NT AUTHORITY\SYSTEM
    SYSTEM
    S-1-5-18

There is a bug[1] in the `SID.string_to_sid` method in versions of
win32-security prior to 0.1.4, so this commit updates the Gemfile
accordingly.

[1] https://github.com/djberg96/win32-security/pull/1

Conflicts:

	spec/unit/util/windows/sid_spec.rb
(#16581) Documentation changes

Clarify how `name_to_sid` and `string_to_sid_ptr` are different with
respect to accounts that exist versus those that don't. The former returns
nil if the account doesn't exist, while the later doesn't.
(#16581) Use native Win32 APIs to resolve SIDs in providers

Previously, the Windows user, group, and scheduled_task providers used WMI
to resolve SIDs, but it is very slow in a domain environment.

This commit changes the providers to use the `Puppet::Util::Windows::SID`
module instead, and has been observed to be 6000 times faster.
(#16581) Use native Win32 APIs to resolve SIDs in file provider

Previously, the file provider used the ADSI module to resolve SIDs, which
is very slow in domain environments.

This commit changes it to use the Puppet::Util::Windows::Security module
instead. Ideally, the `name2id` and `id2name` methods could be eliminated
and instead have the uid & gid methods delegate directly to the Security
module. But they can't, because the Security module is not require'd on
non-Windows platforms.
(#16581) Deprecate sid_for_account

This commit eliminates the code for using WMI to resolve SIDs, since it is
very slow in domain environments. It also adds a deprecation warning if
any provider calls this method, as they should be using
`Puppet::Util::Security::SID.name_to_sid` instead.
(#16798) Fix certificate revocation by serial number

The documentation states that you should be able to revoke
a SSL certificate with 'puppet cert revoke <hex_serial>'
but in practice that doesn't work. This patch enables that
functionality and adds a unit test to check for that scenario.
(#16798) Update revocation by serial number documentation

Without this patch the documentation mis-represents how revocation by
certificate serial number occurs.  When revoking by serial number rather
than common name, the serial number must be represented as a hex-encoded
string with a prefix of '0x'.

This patch simply removes the mention of representing the serial number
as a decimal encoded string.
(#16798) Add more tests to cover revoke by serial number

Without this patch there is only one test covering the revoke by serial
number behavior.  This isn't a problem in and of itself, but I'd like to
see a bit more coverage around the common behavior of mixed-case and the
not-so-common behavior of extremely large serial numbers.

This patch adds spec tests for both behaviors.
Merge branch 'bug/2.7.x/16798_revoke_cert_by_serial' into 2.7.x

* bug/2.7.x/16798_revoke_cert_by_serial:
  (#16798) Add more tests to cover revoke by serial number
  (#16798) Update revocation by serial number documentation
  (#16798) Fix certificate revocation by serial number
Merge branch '2.7.x' into 3.0.x

* 2.7.x:
  (#16798) Add more tests to cover revoke by serial number
  (#16798) Update revocation by serial number documentation
  (#16798) Fix certificate revocation by serial number
Merge branch '3.0.x'

* 3.0.x:
  (#16798) Add more tests to cover revoke by serial number
  (#16798) Update revocation by serial number documentation
  (#16798) Fix certificate revocation by serial number
  Ensure the year in the module template is correct.
Clarifying description for key attribute.
Merge pull request #1231 from pdxmph/ssh_key_desc

Clarifying description for ssh_authorized_key key attribute.
(#16581) Refactor code for sid validation

Previously, the windows file provider knew too much about how to validate
a sid, e.g. catching a specific windows-specific exception.

This commit moves that logic into a `valid_sid?` method and updates the
file provider to call it. In doing so, the logic for `string_to_sid_ptr`
is simplier, in that it always expects a block.

It also removes tests that were refactored into sid_spec.rb in an earlier
commit.
(#11042) indirect via the property to convert group names to numbers

The puppet documentation for managing users says of the attribute gid
"Can be specified numerically or by name".  The ldap provider does not
support specifying by gid by name as (at least on RedHat 389 Directory
Server), it generates a syntax error.  Converting groupnames to numeric
group id resolves the issue.

Reviewed-by: Jeff McCune <jeff@puppetlabs.com>
Merge branch 'nhemingway-fix/2.7.x/11042_ldap_provider_group_names' into 2.7.x

* nhemingway-fix/2.7.x/11042_ldap_provider_group_names:
  (#11042) indirect via the property to convert group names to numbers
Merge branch '2.7.x' into 3.0.x

* 2.7.x:
  (#11042) indirect via the property to convert group names to numbers