HomePhorge

Make string_to_sid_ptr block optional
db0b4fbb35e5Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Make string_to_sid_ptr block optional

Previously the Puppet::Util::Windows::Security#string_to_sid_ptr
method required a block to be passed to it.

This commit makes the block optional, and simply returns true if the
string SID, e.g. 'S-1-5-18', can be converted into a SID pointer
(pointer to the binary SID structure). If the string SID cannot be
converted, then a Puppet::Util::Windows::Error will be thrown. If the
string SID is invalid, then the P::U::W::E#code will return 1337.

This commit is being implemented so that we can validate SIDs prior to
converting from string SIDs to names.

Details

Provenance
Nick Lewis <nick@puppetlabs.com>Authored on
Josh Cooper <josh@puppetlabs.com>Committed on Sep 27 2011, 6:55 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU7fc6baf22a81: Add the ability to retrieve user and group SIDs
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUdb0b4fbb35e5: Make string_to_sid_ptr block optional (authored by Nick Lewis <nick@puppetlabs.com>).Sep 27 2011, 6:55 PM