[python-win32] Where is MakeAbsoluteSD?

Rob Marshall rob.marshall17 at gmail.com
Wed Jun 27 11:14:44 EDT 2018


Hi,

I saw that, my problem is that I'm trying to use
win32security.ConvertSecurityDescriptorToStringSecurityDescriptor()
which is returning a self-relative SDDL and I need one that is
absolute. Is there a flag that I can set and get an absolute SDDL from
that function? In the Microsoft documentation for
ConvertSecurityDescriptorToStringSecurityDescriptor() it says, as to
what it "returns":

A pointer to a variable that receives a pointer to the converted
security descriptor. The returned security descriptor is
self-relative. To free the returned buffer, call the LocalFree
function. To convert the security descriptor to an absolute security
descriptor, use the MakeAbsoluteSD function.

Thanks,

Rob
On Wed, Jun 27, 2018 at 2:23 AM eryk sun <eryksun at gmail.com> wrote:
>
> On Wed, Jun 27, 2018 at 5:04 AM, Rob Marshall <rob.marshall17 at gmail.com> wrote:
> >
> > I'm trying to convert a self-relative security descriptor, i.e. the
> > type that is returned by
> > win32security.ConvertStringSecurityDescriptorToSecurityDescriptor(),
> > to an absolute SD but I can't seem to find the MakeAbsoluteSD()
> > function. Where is it?
>
> A PySECURITY_DESCRIPTOR object is stored in self-relative format.
> Internally it's converted to absolute format for functions that
> require it, such as SetSecurityDescriptorDacl. See the source:
>
> https://github.com/mhammond/pywin32/blob/b223/win32/src/PySECURITY_DESCRIPTOR.cpp


More information about the python-win32 mailing list