Hello Everyone,
I’m trying to catch when Windows denies a file requests. I’ve written a pre
and post routines for IRP_MJ_CREATE in my mini-filter.
According to the Filter Development Guild, “if a minifilter returns
FLT_PREOP_SUCCESS_WITH_CALLBACK from its pre-operation callback, it is
GUARANTEED to receive exactly one completion callback per pre-operation
callback.” This seem to contradict the idea the by the time that a
IRP_MJ_CREATE post completion routine is called, the file is already open.
So, I wrote a test and sure enough, the pre-operation came thru but the post
didn’t…if access was denied. This makes sense to me since to the file
didn’t get opened and hence the post shouldn’t be called.
So my question is this…does a post create REALLY do happen when an access
check fails and there is something wrong in my test or
IF my test IS accurate how do you detect an access denied?
BTW…Filemon is able to report a ACCESS_DENIED on IRP_MJ_CREATE, but I’m
pretty sure that they aren’t using a minifilter.
I guess I could do an access check in my pre-operation, but that just feels
wrong.
thanks
Gene