Accessing a remote/network file

Hi,

I have a working virtual disk driver that accesses a local file. It
also needs to be able to access remote files (i.e. mapped drive, UNC).

I tested the driver with a remote file: ZwCreateFile() returned
STATUS_OBJECT_PATH_NOT_FOUND. I am logged in as a user with
Administrator privileges.

What do I need to do in order provide support for remote files? Any
help, pointers, documentation, etc. is welcome.

Thanks,

Ghassan Yammine

What path are you using and what credentials does the thread have that
makes the request?

Also - you will get better answers to these sorts of questions on the
ntfsd email list, and don’t crosspost or the wrath of the big kahuna
will be visited on your sorry self.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ghassan Yammine
Sent: Thursday, June 22, 2006 11:10 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Accessing a remote/network file

Hi,

I have a working virtual disk driver that accesses a local file. It
also needs to be able to access remote files (i.e. mapped drive, UNC).

I tested the driver with a remote file: ZwCreateFile() returned
STATUS_OBJECT_PATH_NOT_FOUND. I am logged in as a user with
Administrator privileges.

What do I need to do in order provide support for remote files? Any
help, pointers, documentation, etc. is welcome.

Thanks,

Ghassan Yammine


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3B319447

Mark:

The path passed to ZwCreateFile() was: ??\z:\dyn.vhd
I don’t know what credentials the thread had. There is nothing in the
code that suggests token/credential/security manipulation. The thread
that opens the file is created via:

PsCreateSystemThread( &handle,
(ACCESS_MASK) 0L, // driver-created
NULL,
NULL,
NULL,
vdisk_thread, // the function to run
(PVOID)vdisk); // our context

I will move the thread over to ntfsd, but please respond here if you
choose to.

Thanks,

Roddy, Mark wrote:

What path are you using and what credentials does the thread have that
makes the request?

Also - you will get better answers to these sorts of questions on the
ntfsd email list, and don’t crosspost or the wrath of the big kahuna
will be visited on your sorry self.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ghassan Yammine
Sent: Thursday, June 22, 2006 11:10 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Accessing a remote/network file

Hi,

I have a working virtual disk driver that accesses a local file. It
also needs to be able to access remote files (i.e. mapped drive, UNC).

I tested the driver with a remote file: ZwCreateFile() returned
STATUS_OBJECT_PATH_NOT_FOUND. I am logged in as a user with
Administrator privileges.

What do I need to do in order provide support for remote files? Any
help, pointers, documentation, etc. is welcome.

Thanks,

Ghassan Yammine


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

You should go over to the ntfsd list. You need to change the path to be
lanmanager based and you need to borrow a thread from a user mode
process with appropriate credentials to perform your IO requests. The
folks over on ntfsd will explain all of this in gory detail, probably by
suggesting that you search for the explanations.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ghassan Yammine
Sent: Thursday, June 22, 2006 5:33 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Accessing a remote/network file

Mark:

The path passed to ZwCreateFile() was: ??\z:\dyn.vhd
I don’t know what credentials the thread had. There is nothing in the
code that suggests token/credential/security manipulation. The thread
that opens the file is created via:

PsCreateSystemThread( &handle,
(ACCESS_MASK) 0L, // driver-created
NULL,
NULL,
NULL,
vdisk_thread, // the function to run
(PVOID)vdisk); // our context

I will move the thread over to ntfsd, but please respond here if you
choose to.

Thanks,

Roddy, Mark wrote:

What path are you using and what credentials does the thread have that
makes the request?

Also - you will get better answers to these sorts of questions on the
ntfsd email list, and don’t crosspost or the wrath of the big kahuna
will be visited on your sorry self.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ghassan Yammine
Sent: Thursday, June 22, 2006 11:10 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Accessing a remote/network file

Hi,

I have a working virtual disk driver that accesses a local file. It
also needs to be able to access remote files (i.e. mapped drive, UNC).

I tested the driver with a remote file: ZwCreateFile() returned
STATUS_OBJECT_PATH_NOT_FOUND. I am logged in as a user with
Administrator privileges.

What do I need to do in order provide support for remote files? Any
help, pointers, documentation, etc. is welcome.

Thanks,

Ghassan Yammine


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

The path is wrong - it’s session specific (since you are trying to use a
CIFS/LanManager/RDR2 symbolic link name,) which means the symbolic link
probably just doesn’t resolve in the session in which you are operating
and you get the invalid path error.

Regards,

Tony

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ghassan Yammine
Sent: Thursday, June 22, 2006 5:33 PM
To: ntdev redirect
Subject: Re:[ntdev] Accessing a remote/network file

Mark:

The path passed to ZwCreateFile() was: ??\z:\dyn.vhd
I don’t know what credentials the thread had. There is nothing in the
code that suggests token/credential/security manipulation. The thread
that opens the file is created via:

PsCreateSystemThread( &handle,
(ACCESS_MASK) 0L, // driver-created
NULL,
NULL,
NULL,
vdisk_thread, // the function to run
(PVOID)vdisk); // our context

I will move the thread over to ntfsd, but please respond here if you
choose to.

Thanks,

Roddy, Mark wrote:

What path are you using and what credentials does the thread have that
makes the request?

Also - you will get better answers to these sorts of questions on the
ntfsd email list, and don’t crosspost or the wrath of the big kahuna
will be visited on your sorry self.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ghassan Yammine
Sent: Thursday, June 22, 2006 11:10 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Accessing a remote/network file

Hi,

I have a working virtual disk driver that accesses a local file. It
also needs to be able to access remote files (i.e. mapped drive, UNC).

I tested the driver with a remote file: ZwCreateFile() returned
STATUS_OBJECT_PATH_NOT_FOUND. I am logged in as a user with
Administrator privileges.

What do I need to do in order provide support for remote files? Any
help, pointers, documentation, etc. is welcome.

Thanks,

Ghassan Yammine


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer