IRP_MJ_QUERY_SECURITY confusion...

I am confused about IRP_MJ_QUERY_SECURITY… If my FSD gets one of these
IRPs, am I supposed to allocate a buffer for the Security Descriptor that
I am supposed to return, or does the system give me a buffer (sometimes
too small?) to copy the SD into?

If I supply the buffer, who frees it?

Should I update PointerToIoStackLocation->Parameters.QuerySecurity.Length
with the size of the buffer?

Should I do the same for Irp->IoStatus.Information?

Thanks for your time and insight…

Greg Pearce

NO. The buffer is user-provided. If it isn’t big enough, reject the
request (STATUS_BUFFER_OVERFLOW) and set the needed length (Information =
minimum size required).

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: Greg Pearce [mailto:xxxxx@filetek.com]
Sent: Tuesday, June 10, 2003 8:13 AM
To: File Systems Developers
Subject: [ntfsd] IRP_MJ_QUERY_SECURITY confusion…

I am confused about IRP_MJ_QUERY_SECURITY… If my FSD gets one of these
IRPs, am I supposed to allocate a buffer for the Security Descriptor that
I am supposed to return, or does the system give me a buffer (sometimes
too small?) to copy the SD into?

If I supply the buffer, who frees it?

Should I update PointerToIoStackLocation->Parameters.QuerySecurity.Length
with the size of the buffer?

Should I do the same for Irp->IoStatus.Information?

Thanks for your time and insight…

Greg Pearce


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Tony,

As usual, that was a good answer - It’s working now. Thanks again.

Regards,

Greg