Archive: Passing a Double Pointer With the System Plug-In


Passing a Double Pointer With the System Plug-In
Hey guys,
I'm trying to call this windows api using the system plug-in:

BOOL WINAPI GetSecurityDescriptorSacl(
__in PSECURITY_DESCRIPTOR pSecurityDescriptor,
__out LPBOOL lpbSaclPresent,
__out PACL *pSacl,
__out LPBOOL lpbSaclDefaulted
);

but it's causing the installer to crash due to the fact that the third paramter isn't valid. This is a pointer to a pointer pointing to an 8-bit structure.

typedef struct _ACL {
BYTE AclRevision;
BYTE Sbz1;
WORD AclSize;
WORD AceCount;
WORD Sbz2;
} ACL;

I've tried everything I can think of to properly allocate and pass this, but it doesn't seem to work. Any ideas?


just *i.r0 should work ($0 would then be 0 or have the ADDRESS of a PACL (You are not supposed to modify a ACL directly anyway IIRC))


Don't I need to allocate the space required for the acl first?


no, I think the ACL is already somewhere inside the pSecurityDescriptor block of memory