Hi,
I’m trying to return an access denied error code within my filter driver
for certain remote rename operations. I issue a command “ren a.xyz b.rst”
and expect an “access denied” response. I’ve noticed that if I return
the error from the IRP_MJ_CREATE for “a.xyz” the return code gets
reflected
at the command prompt. However if I return the code from
IRP_MJ_SET_INFORMATION for “b.rst” the access denied is not displayed
on the command prompt. In both cases I achieve the desired effect as the
rename is prevented from happening.
I fail to understand why the error is not reflected properly in the
second case. Has it anything to do with the thread context?
Regards,
Royston Mascarenhas.
The way how an application responds to the access deny status code
depends on the application. In your case, the command prompt “rename”
command is just an application. Other applications (Explorer) might
respond different to the access denied status code.
Bartjan
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Royston
Mascarenhas
Sent: maandag 23 september 2002 16:52
To: File Systems Developers
Subject: [ntfsd] returning access denied to user level API
Hi,
I’m trying to return an access denied error code within my
filter driver for certain remote rename operations. I issue a
command “ren a.xyz b.rst” and expect an “access denied”
response. I’ve noticed that if I return the error from the
IRP_MJ_CREATE for “a.xyz” the return code gets reflected at
the command prompt. However if I return the code from
IRP_MJ_SET_INFORMATION for “b.rst” the access denied is not
displayed on the command prompt. In both cases I achieve the
desired effect as the rename is prevented from happening.
I fail to understand why the error is not reflected properly
in the second case. Has it anything to do with the thread context?
Regards,
Royston Mascarenhas.
You are currently subscribed to ntfsd as: xxxxx@zeelandnet.nl
To unsubscribe send a blank email to %%email.unsub%%
It actually depends on the application to respond to an error code from
the driver. It’s always better to check file operations from the command
prompt and Explorer. They sometimes behave differently though not always.
Thanks,
Amit Bhate
Hi,
Thanks for the replies. I’m sorry I forgot to mention that I had tried
this from both the command prompt & explorer. In both cases I observed
the same behaviour, which prompted me to post this question. I do
understand that it is finally the responsibility of the app to post the
correct return code, but both explorer & cmd behaving the same way was
too much of a coincidence.
Thanks & regards,
Royston Mascarenhas.
Are you returning it correctly? I.e. setting Irp->IoStatus.Status,
calling IoCompleteReqest and returning the same code you set
Irp->IoStatus.Status to? (Don’t touch Irp after IoCompleteRequest)
Deja.
Royston Mascarenhas wrote:
Hi,
Thanks for the replies. I’m sorry I forgot to mention that I had tried
this from both the command prompt & explorer. In both cases I observed
the same behaviour, which prompted me to post this question. I do
understand that it is finally the responsibility of the app to post the
correct return code, but both explorer & cmd behaving the same way was
too much of a coincidence.
–
Kind regards, Dejan M. www.alfasp.com
E-mail: xxxxx@alfasp.com ICQ#: 56570367
Alfa File Monitor - File monitoring library for Win32 developers.
Alfa File Protector - File protection and hiding library for Win32
developers.