File or Folder opened ?

Hi

What is the best way of working out if a file or folder has been opened in
the completion of an IRP_MJCREATE ?

At the moment I am using irpSp->FileObject->fsContext to see if it is a FCB
or DCB but this seems a bit fragile (I only need to do processing for
files). Any better ways ?

TTFN
Paul Delivett


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Check for this flags FILE_DIRECTORY_FILE

----- Original Message -----
From: “Paul Delivett”
To: “File Systems Developers”
Sent: Tuesday, March 06, 2001 5:13 PM
Subject: [ntfsd] File or Folder opened ?

> Hi
>
> What is the best way of working out if a file or folder has been opened in
> the completion of an IRP_MJCREATE ?
>
> At the moment I am using irpSp->FileObject->fsContext to see if it is a
FCB
> or DCB but this seems a bit fragile (I only need to do processing for
> files). Any better ways ?
>
> TTFN
> Paul Delivett
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@aalayance.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

if (irpSp->Parameters.Create.Options & FILE_DIRECTORY_FILE)

status = STATUS_NOT_A_DIRECTORY;
}

Regards,
Satish K.S
----- Original Message -----
From: “Paul Delivett”
To: “File Systems Developers”
Sent: Tuesday, March 06, 2001 5:13 PM
Subject: [ntfsd] File or Folder opened ?

> Hi
>
> What is the best way of working out if a file or folder has been opened in
> the completion of an IRP_MJCREATE ?
>
> At the moment I am using irpSp->FileObject->fsContext to see if it is a
FCB
> or DCB but this seems a bit fragile (I only need to do processing for
> files). Any better ways ?
>
> TTFN
> Paul Delivett
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@aalayance.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

According to Rajeev Nagar and through observation it is not always set. I
have checked both FILE_DIRECTORY_FILE and FILE_NON_IRECTORY_FILE

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Satish
Sent: Tuesday, March 06, 2001 12:02 PM
To: File Systems Developers
Subject: [ntfsd] Re: File or Folder opened ?

if (irpSp->Parameters.Create.Options & FILE_DIRECTORY_FILE)

status = STATUS_NOT_A_DIRECTORY;
}

Regards,
Satish K.S
----- Original Message -----
From: “Paul Delivett”
To: “File Systems Developers”
Sent: Tuesday, March 06, 2001 5:13 PM
Subject: [ntfsd] File or Folder opened ?

> Hi
>
> What is the best way of working out if a file or folder has been opened in
> the completion of an IRP_MJCREATE ?
>
> At the moment I am using irpSp->FileObject->fsContext to see if it is a
FCB
> or DCB but this seems a bit fragile (I only need to do processing for
> files). Any better ways ?
>
> TTFN
> Paul Delivett
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@aalayance.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@Carraig.co.uk
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Correct me if I am wrong, but my undersrstanding of the situation was that
if you receive file open request for a directory without FILE_DIRECTORY_FILE
flag set, it means that the user is trying to open a directory as a file
which generally should not make sense to the file system and thus it should
deny the request…

ASY

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Paul Delivett
Sent: Thursday, March 08, 2001 11:46 AM
To: File Systems Developers
Subject: [ntfsd] RE: File or Folder opened ?

According to Rajeev Nagar and through observation it is not always set. I
have checked both FILE_DIRECTORY_FILE and FILE_NON_IRECTORY_FILE

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Satish
Sent: Tuesday, March 06, 2001 12:02 PM
To: File Systems Developers
Subject: [ntfsd] Re: File or Folder opened ?

if (irpSp->Parameters.Create.Options & FILE_DIRECTORY_FILE)

status = STATUS_NOT_A_DIRECTORY;
}

Regards,
Satish K.S
----- Original Message -----
From: “Paul Delivett”
To: “File Systems Developers”
Sent: Tuesday, March 06, 2001 5:13 PM
Subject: [ntfsd] File or Folder opened ?

> Hi
>
> What is the best way of working out if a file or folder has been opened in
> the completion of an IRP_MJCREATE ?
>
> At the moment I am using irpSp->FileObject->fsContext to see if it is a
FCB
> or DCB but this seems a bit fragile (I only need to do processing for
> files). Any better ways ?
>
> TTFN
> Paul Delivett
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@aalayance.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@Carraig.co.uk
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@GenesisFX.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com