File Deletion IRP_MJ calls

Hi

Could someone tell me which IRP_MJ calls are called for deletion of a file.

Cheers
Sha

InTechnology plc - Secure Offsite Data
Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3 1SA.
Main: 01423 850000
Fax: 01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology’s supplier accreditations visit
our website accreditation page at
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp


This message has been checked for all known viruses by the
CitC Virus Scanning Service powered by SkyLabs. For further information visit
http://www.citc.it

IRP_MJ_SET_INFORMATION.

----- Original Message -----
From: “Sharanga Dayananda”
To: “File Systems Developers”
Sent: Tuesday, July 09, 2002 4:44 PM
Subject: [ntfsd] File Deletion IRP_MJ calls

> Hi
>
> Could someone tell me which IRP_MJ calls are called for deletion of a
file.
>
> Cheers
> Sha
> ==============================================
> InTechnology plc - Secure Offsite Data
> Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3 1SA.
> Main: 01423 850000
> Fax: 01423 858855
> www.intechnology.co.uk
>
> For a comprehensive list of InTechnology’s supplier accreditations visit
> our website accreditation page at
> www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp
>
>
> _____________________________________________________________________
> This message has been checked for all known viruses by the
> CitC Virus Scanning Service powered by SkyLabs. For further information
visit
> http://www.citc.it
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>

Sha,

IRP_MJ_SET_INFORMATION

irpSp->Parameters.SetFile.FileInformationClass == FileDispositionInformation

Kurt

-----Original Message-----
From: Sharanga Dayananda [mailto:xxxxx@intechnology.co.uk]
Sent: Tuesday, July 09, 2002 7:44 AM
To: File Systems Developers
Subject: [ntfsd] File Deletion IRP_MJ calls

Hi

Could someone tell me which IRP_MJ calls are called for deletion of a file.

Cheers
Sha

InTechnology plc - Secure Offsite Data
Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3 1SA.
Main: 01423 850000
Fax: 01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology’s supplier accreditations visit
our website accreditation page at
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp


This message has been checked for all known viruses by the
CitC Virus Scanning Service powered by SkyLabs. For further information
visit
http://www.citc.it


You are currently subscribed to ntfsd as: xxxxx@1vision.com
To unsubscribe send a blank email to %%email.unsub%%

IRP_MJ_CREATE with FILE_DELETE_ON_CLOSE flag set in Options,
IRP_MJ_SET_INFORMATION with FileDispositionInformation class,
but the deletion itself is done when the driver receives IRP_MJ_CLEANUP
and the file is “marked for deletion” by one of previous two methods.
Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Sharanga Dayananda
Sent: Tuesday, July 09, 2002 3:44 PM
To: File Systems Developers
Subject: [ntfsd] File Deletion IRP_MJ calls

Hi

Could someone tell me which IRP_MJ calls are called for deletion of a file.

Cheers
Sha

InTechnology plc - Secure Offsite Data
Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3 1SA.
Main: 01423 850000
Fax: 01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology’s supplier accreditations visit
our website accreditation page at
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp


This message has been checked for all known viruses by the
CitC Virus Scanning Service powered by SkyLabs. For further information
visit
http://www.citc.it


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to %%email.unsub%%

There are two techniques:

(1) The technique everyone mentions (IRP_MJ_SET_INFORMATION with the
FileDispositionInformation type, using the FILE_DISPOSITION_INFORMATION data
structure’s Disposition field - a very fancy way of encoding a single byte
value Boolean).

(2) By indicating FILE_DELETE_ON_CLOSE during IRP_MJ_CREATE processing.

You can (and will) observe both of these. In any case, the caller must have
DELETE access to the file (hence, it must pass both a security check as well
as a sharing check.)

In addition, an IRP_MJ_CREATE with the FileSupersede disposition is
remarkably similar to a delete (it destroys the attributes and data of the
file) and actually requires DELETE access to the file. This may, or may
not, be an issue for you.

Regards,

Tony

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

Hope to see you at the next OSR file systems class in San Jose, CA September
16, 2002!

-----Original Message-----
From: Sharanga Dayananda [mailto:xxxxx@intechnology.co.uk]
Sent: Tuesday, July 09, 2002 9:44 AM
To: File Systems Developers
Subject: [ntfsd] File Deletion IRP_MJ calls

Hi

Could someone tell me which IRP_MJ calls are called for deletion of a file.

Cheers
Sha

InTechnology plc - Secure Offsite Data
Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3 1SA.
Main: 01423 850000
Fax: 01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology’s supplier accreditations visit
our website accreditation page at
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp


This message has been checked for all known viruses by the
CitC Virus Scanning Service powered by SkyLabs. For further information
visit
http://www.citc.it


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

Some caveats for filter writers…

First, the file can be unmarked for deletion by using FileDispositionInformation with Disposition set to FALSE.

Second, management of the file’s pending delete state is divided between the CCB and the FCB. When you use the FileDispositionInformation mechanism, the file system sets/clears a flag in the FCB denoting the file’s delete on close state. However, when you use the FILE_DELETE_ON_CLOSE flag to IRP_MJ_CREATE, the delete on close state is stored in the CCB. In this case, the CCB flag is propagated to the FCB flag during IRP_MJ_CLEANUP. This makes for some interesting interaction between these two mechanisms which your filter needs to track if you expect to detect delete correctly.

-----Original Message-----
From: Pavel Hrdina [mailto:xxxxx@compelson.com]
Sent: Tuesday, July 09, 2002 9:57 AM
To: File Systems Developers
Subject: [ntfsd] RE: File Deletion IRP_MJ calls

IRP_MJ_CREATE with FILE_DELETE_ON_CLOSE flag set in Options,
IRP_MJ_SET_INFORMATION with FileDispositionInformation class,
but the deletion itself is done when the driver receives IRP_MJ_CLEANUP
and the file is “marked for deletion” by one of previous two methods.
Paul

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Sharanga Dayananda
Sent: Tuesday, July 09, 2002 3:44 PM
To: File Systems Developers
Subject: [ntfsd] File Deletion IRP_MJ calls

Hi

Could someone tell me which IRP_MJ calls are called for deletion of a file.

Cheers
Sha

InTechnology plc - Secure Offsite Data
Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3 1SA.
Main: 01423 850000
Fax: 01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology’s supplier accreditations visit
our website accreditation page at
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp


This message has been checked for all known viruses by the
CitC Virus Scanning Service powered by SkyLabs. For further information visit
http://www.citc.it


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@inin.com
To unsubscribe send a blank email to %%email.unsub%%

Also, I think Pavel’s statement is misleading. He says, “deletion itself is done when the driver receives IRP_MJ_CLEANUP
and the file is marked for deletion.” This isn’t precise. He should have said the deletion is done when the driver receives IRP_MJ_CLEANUP for the last file object associated with the FCB and the FCB is marked for deletion.

-----Original Message-----
From: Fuller, Rob
Sent: Tuesday, July 09, 2002 1:26 PM
To: ‘File Systems Developers’
Subject: RE: [ntfsd] RE: File Deletion IRP_MJ calls

Some caveats for filter writers…

First, the file can be unmarked for deletion by using FileDispositionInformation with Disposition set to FALSE.

Second, management of the file’s pending delete state is divided between the CCB and the FCB. When you use the FileDispositionInformation mechanism, the file system sets/clears a flag in the FCB denoting the file’s delete on close state. However, when you use the FILE_DELETE_ON_CLOSE flag to IRP_MJ_CREATE, the delete on close state is stored in the CCB. In this case, the CCB flag is propagated to the FCB flag during IRP_MJ_CLEANUP. This makes for some interesting interaction between these two mechanisms which your filter needs to track if you expect to detect delete correctly.

-----Original Message-----
From: Pavel Hrdina [mailto:xxxxx@compelson.com]
Sent: Tuesday, July 09, 2002 9:57 AM
To: File Systems Developers
Subject: [ntfsd] RE: File Deletion IRP_MJ calls

IRP_MJ_CREATE with FILE_DELETE_ON_CLOSE flag set in Options,
IRP_MJ_SET_INFORMATION with FileDispositionInformation class,
but the deletion itself is done when the driver receives IRP_MJ_CLEANUP
and the file is “marked for deletion” by one of previous two methods.
Paul

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Sharanga Dayananda
Sent: Tuesday, July 09, 2002 3:44 PM
To: File Systems Developers
Subject: [ntfsd] File Deletion IRP_MJ calls

Hi

Could someone tell me which IRP_MJ calls are called for deletion of a file.

Cheers
Sha

InTechnology plc - Secure Offsite Data
Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3 1SA.
Main: 01423 850000
Fax: 01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology’s supplier accreditations visit
our website accreditation page at
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp


This message has been checked for all known viruses by the
CitC Virus Scanning Service powered by SkyLabs. For further information visit
http://www.citc.it


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@inin.com
To unsubscribe send a blank email to %%email.unsub%%

Yes, Rob, you’re correct. I’ve forgotten to mention this important
detail.
I hope that my fault can be forgiven by gracious readers… ;-)))
Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Fuller, Rob
Sent: Tuesday, July 09, 2002 8:36 PM
To: File Systems Developers
Subject: [ntfsd] RE: File Deletion IRP_MJ calls

Also, I think Pavel’s statement is misleading. He says, “deletion
itself is done when the driver receives IRP_MJ_CLEANUP
and the file is marked for deletion.” This isn’t precise. He should
have said the deletion is done when the driver receives IRP_MJ_CLEANUP
for the last file object associated with the FCB and the FCB is marked
for deletion.

-----Original Message-----
From: Fuller, Rob
Sent: Tuesday, July 09, 2002 1:26 PM
To: ‘File Systems Developers’
Subject: RE: [ntfsd] RE: File Deletion IRP_MJ calls

Some caveats for filter writers…

First, the file can be unmarked for deletion by using
FileDispositionInformation with Disposition set to FALSE.

Second, management of the file’s pending delete state is divided between
the CCB and the FCB. When you use the FileDispositionInformation
mechanism, the file system sets/clears a flag in the FCB denoting the
file’s delete on close state. However, when you use the
FILE_DELETE_ON_CLOSE flag to IRP_MJ_CREATE, the delete on close state is
stored in the CCB. In this case, the CCB flag is propagated to the FCB
flag during IRP_MJ_CLEANUP. This makes for some interesting interaction
between these two mechanisms which your filter needs to track if you
expect to detect delete correctly.

-----Original Message-----
From: Pavel Hrdina [mailto:xxxxx@compelson.com]
Sent: Tuesday, July 09, 2002 9:57 AM
To: File Systems Developers
Subject: [ntfsd] RE: File Deletion IRP_MJ calls

IRP_MJ_CREATE with FILE_DELETE_ON_CLOSE flag set in Options,
IRP_MJ_SET_INFORMATION with FileDispositionInformation class,
but the deletion itself is done when the driver receives IRP_MJ_CLEANUP
and the file is “marked for deletion” by one of previous two methods.
Paul

-----Original Message-----
From: xxxxx@lists.osr.com [
mailto:xxxxx@lists.osr.com]On Behalf Of Sharanga Dayananda
Sent: Tuesday, July 09, 2002 3:44 PM
To: File Systems Developers
Subject: [ntfsd] File Deletion IRP_MJ calls

Hi

Could someone tell me which IRP_MJ calls are called for deletion of a
file.

Cheers
Sha

InTechnology plc - Secure Offsite Data
Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3 1SA.
Main: 01423 850000
Fax: 01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology’s supplier accreditations visit

our website accreditation page at
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp


This message has been checked for all known viruses by the
CitC Virus Scanning Service powered by SkyLabs. For further information
visit
http://www.citc.it


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@inin.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to %%email.unsub%%

The details weren’t important to those trying to delete a file which is the question you were answering. I thought you gave a reasonably precise answer to that question. I was concerned about those people who are writing filters who read this list. They might have received the incorrect impression that delete is simple to handle in a filter :slight_smile:

-----Original Message-----
From: Paul Hrdina [mailto:xxxxx@compelson.com]
Sent: Tuesday, July 09, 2002 3:58 PM
To: File Systems Developers
Subject: [ntfsd] RE: File Deletion IRP_MJ calls

Yes, Rob, you’re correct. I’ve forgotten to mention this important detail.
I hope that my fault can be forgiven by gracious readers… ;-)))
Paul

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Fuller, Rob
Sent: Tuesday, July 09, 2002 8:36 PM
To: File Systems Developers
Subject: [ntfsd] RE: File Deletion IRP_MJ calls

Also, I think Pavel’s statement is misleading. He says, “deletion itself is done when the driver receives IRP_MJ_CLEANUP
and the file is marked for deletion.” This isn’t precise. He should have said the deletion is done when the driver receives IRP_MJ_CLEANUP for the last file object associated with the FCB and the FCB is marked for deletion.

-----Original Message-----
From: Fuller, Rob
Sent: Tuesday, July 09, 2002 1:26 PM
To: ‘File Systems Developers’
Subject: RE: [ntfsd] RE: File Deletion IRP_MJ calls

Some caveats for filter writers…

First, the file can be unmarked for deletion by using FileDispositionInformation with Disposition set to FALSE.

Second, management of the file’s pending delete state is divided between the CCB and the FCB. When you use the FileDispositionInformation mechanism, the file system sets/clears a flag in the FCB denoting the file’s delete on close state. However, when you use the FILE_DELETE_ON_CLOSE flag to IRP_MJ_CREATE, the delete on close state is stored in the CCB. In this case, the CCB flag is propagated to the FCB flag during IRP_MJ_CLEANUP. This makes for some interesting interaction between these two mechanisms which your filter needs to track if you expect to detect delete correctly.

-----Original Message-----
From: Pavel Hrdina [mailto:xxxxx@compelson.com]
Sent: Tuesday, July 09, 2002 9:57 AM
To: File Systems Developers
Subject: [ntfsd] RE: File Deletion IRP_MJ calls

IRP_MJ_CREATE with FILE_DELETE_ON_CLOSE flag set in Options,
IRP_MJ_SET_INFORMATION with FileDispositionInformation class,
but the deletion itself is done when the driver receives IRP_MJ_CLEANUP
and the file is “marked for deletion” by one of previous two methods.
Paul

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Sharanga Dayananda
Sent: Tuesday, July 09, 2002 3:44 PM
To: File Systems Developers
Subject: [ntfsd] File Deletion IRP_MJ calls

Hi

Could someone tell me which IRP_MJ calls are called for deletion of a file.

Cheers
Sha

InTechnology plc - Secure Offsite Data
Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3 1SA.
Main: 01423 850000
Fax: 01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology’s supplier accreditations visit
our website accreditation page at
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp


This message has been checked for all known viruses by the
CitC Virus Scanning Service powered by SkyLabs. For further information visit
http://www.citc.it


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@inin.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@inin.com
To unsubscribe send a blank email to %%email.unsub%%

MJ_SET_INFORMATION/FileDispositionInformation.

Max

----- Original Message -----
From: “Sharanga Dayananda”
To: “File Systems Developers”
Sent: Tuesday, July 09, 2002 5:44 PM
Subject: [ntfsd] File Deletion IRP_MJ calls

> Hi
>
> Could someone tell me which IRP_MJ calls are called for deletion of
a file.
>
> Cheers
> Sha
> ==============================================
> InTechnology plc - Secure Offsite Data
> Head Office: Nidderdale House, Beckwith Knowle, Harrogate, HG3
1SA.
> Main: 01423 850000
> Fax: 01423 858855
> www.intechnology.co.uk
>
> For a comprehensive list of InTechnology’s supplier accreditations
visit
> our website accreditation page at
> www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp
>
>
>
_____________________________________________________________________
> This message has been checked for all known viruses by the
> CitC Virus Scanning Service powered by SkyLabs. For further
information visit
> http://www.citc.it
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>