So what if I deny create is post-create

Without no further prelude. I want to deny a create in post create. Is it OK to just set the Irp status to the specified error code and complete and return the error status code. I really don’t understant why would someone use IoCancelFileOpen. Isn’t this just gonna happen after I deny a successful creation of the create IRP ?
I guess the requester will just issue the CLOSE request that IoCancelFileOpen issues, on the FILE_OBJECT if the create is not successful.
Is there something I am missing ?

What if program opens file with FILE_OVERWRITE option? Data are lost since
FSD drops the contents, but the program cannot refill data because open
fails.
Neither CancelFileOpen solves the issue and you should write much more code
to be able cancel successfull file open. Best way is to deny processing in
pre-create path.

Jan

wrote in message news:xxxxx@ntfsd…
> Without no further prelude. I want to deny a create in post
create. Is it OK to just set the Irp status to the specified error code and
complete and return the error status code. I really don’t understant why
would someone use IoCancelFileOpen. Isn’t this just gonna happen after I
deny a successful creation of the create IRP ?
> I guess the requester will just issue the CLOSE request that
IoCancelFileOpen issues, on the FILE_OBJECT if the create is not successful.
> Is there something I am missing ?
>
>

I know. I handle very carefully the supersedes and overwrites. Thanks for
the reply. I was worrying for strictly technical issues.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Milan
Sent: Monday, September 15, 2008 4:20 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] So what if I deny create is post-create

What if program opens file with FILE_OVERWRITE option? Data are lost since
FSD drops the contents, but the program cannot refill data because open
fails.
Neither CancelFileOpen solves the issue and you should write much more code
to be able cancel successfull file open. Best way is to deny processing in
pre-create path.

Jan

wrote in message news:xxxxx@ntfsd…
> Without no further prelude. I want to deny a create in post
create. Is it OK to just set the Irp status to the specified error code and
complete and return the error status code. I really don’t understant why
would someone use IoCancelFileOpen. Isn’t this just gonna happen after I
deny a successful creation of the create IRP ?
> I guess the requester will just issue the CLOSE request that
IoCancelFileOpen issues, on the FILE_OBJECT if the create is not successful.
> Is there something I am missing ?
>
>


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

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