Hi!
I need to print the members of SECURITY_DESCRIPTOR structure that come in IRP_MJ_SET_SECURITY precallback routine of minifilter.
I need to print something of this sort:
DbgPrint(“%u”,Data->Iopb->Parameters.SetSecurity.SecurityDescriptor->Dacl->AceCount);
There are 2 diff. SECURITY_DESCRIPTOR pointers:
typedef union _FLT_PARAMETERS
{
…
struct {
SECURITY_INFORMATION SecurityInformation;
PSECURITY_DESCRIPTOR SecurityDescriptor;
} SetSecurity;
};
typedef struct _SECURITY_DESCRIPTOR {
UCHAR Revision;
UCHAR Sbz1;
SECURITY_DESCRIPTOR_CONTROL Control;
PSID Owner;
PSID Group;
PACL Sacl;
PACL Dacl;
} SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
I tried to find out definition for PSECURITY_DESCRIPTOR. but did not get it…
Are PSECURITY_DESCRIPTOR and PISECURITY_DESCRIPTOR same or different??
How can i print the above stated members (…->AceCount) ?
Thanks…
Got the answer!!
PSECURITY_DESCRIPTOR is declared in ntddk.h
typedef PVOID PSECURITY_DESCRIPTOR;
That is the security descriptor, PSECURITY_DESCRIPTOR is defined as PVOID. Reason: the structure should be opaque. You can of
course typecast it (never tried it, but for debug purposes, it’s OK to try). So typecast the SecurityDescriptor to
PISECURITY_DESCRIPTOR and then dbgprint it.
Dej.
xxxxx@yahoo.com wrote:
Hi!
I need to print the members of SECURITY_DESCRIPTOR structure that come in IRP_MJ_SET_SECURITY precallback routine of minifilter.
I need to print something of this sort:
DbgPrint(“%u”,Data->Iopb->Parameters.SetSecurity.SecurityDescriptor->Dacl->AceCount);
There are 2 diff. SECURITY_DESCRIPTOR pointers:
typedef union _FLT_PARAMETERS
{
…
struct {
SECURITY_INFORMATION SecurityInformation;
PSECURITY_DESCRIPTOR SecurityDescriptor;
} SetSecurity;
};
typedef struct _SECURITY_DESCRIPTOR {
UCHAR Revision;
UCHAR Sbz1;
SECURITY_DESCRIPTOR_CONTROL Control;
PSID Owner;
PSID Group;
PACL Sacl;
PACL Dacl;
} SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
I tried to find out definition for PSECURITY_DESCRIPTOR. but did not get it…
Are PSECURITY_DESCRIPTOR and PISECURITY_DESCRIPTOR same or different??
How can i print the above stated members (…->AceCount) ?
–
King regards, Dejan
http://www.alfasp.com
File system audit, security and encryption kits.