Details
Description
As part of PUP-5735 it was found that the administrative token detection for legacy operating systems always evaluated as true. This was due to a simple typo at https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/windows/user.rb#L46
The helper function returns a bool type however the check is against an integer. Therefore is_admin is always returns because bool <> int32 is always true.
Changing the line to
is_admin = ismember_pointer.read_win32_bool
|
fixes the problem
Attachments
Issue Links
- relates to
-
PUP-5735 Remove usage of win32-security gem
-
- Closed
-
- links to