how to open a network mapped file

Hi all,

Does the Zwcreatefile call works if the file is on a network mapped drive!
if not how to open such files.!

thanks,
KIRAN MANDAVA


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

> Does the Zwcreatefile call works if the file is on a network mapped
drive!

if not how to open such files.!

It works, but:

  • you must specify the “??\UNC\Server\Share\Path” to it
  • it will not work from System process context due to pecularities of NT’s
    security model.

Max


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

>It works, but:

  • you must specify the “??\UNC\Server\Share\Path” to it
  • it will not work from System process context due to
    pecularities of NT’s
    security model.

Does this mechanism work in kernel too!!!

thx

-----Original Message-----
From: Maxim S. Shatskih [ mailto:xxxxx@storagecraft.com
mailto:xxxxx ]
>Sent: Tuesday, January 23, 2001 4:48 AM
>To: NT Developers Interest List
>Subject: [ntdev] Re: how to open a network mapped file
>
>
>> Does the Zwcreatefile call works if the file is on a network mapped
>drive!
>> if not how to open such files.!
>

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


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

> >It works, but:

>- you must specify the “??\UNC\Server\Share\Path” to it
>- it will not work from System process context due to
>pecularities of NT’s
>security model.

Does this mechanism work in kernel too!!!

Yes, if the caller of ZwCreateFile is not in a system process context.

Max


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

Pardon my ignorance, but what other context would you be in? I guess doing
SCSI miniports probably limits my exposure to the possibilities, but you
would *probably* be calling ZwCreateFile during init only, hence in a system
process context, or am I mistaken?

Phil

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, January 24, 2001 10:04 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to open a network mapped file

>It works, but:
>- you must specify the “??\UNC\Server\Share\Path” to it
>- it will not work from System process context due to
>pecularities of NT’s
>security model.

Does this mechanism work in kernel too!!!

Yes, if the caller of ZwCreateFile is not in a system process context.

Max


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


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

> Pardon my ignorance, but what other context would you be in?

In the context of the user process who issued a syscall or page fault.

would *probably* be calling ZwCreateFile during init only, hence in a
system
process context, or am I mistaken?

Then you will not be able to access the files on the network. The problem is
because the LocalSystem account has no password information associated with
it and thus cannot issue the credentials to logon to the SMB server.
So - NO code running under LocalSystem can access the SMB shares.

The situation is IIRC a bit different on w2k when you can make your
LocalSystem account known to other machines - but it requires special
network setup.

Max


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

Like I said, I’m dong SCSI miniports, and the only time I am called at
PASSIVE_LEVEL is at init time, and when I am called in the user context,
it’s to process an IO or an interrupt, and I am at DIRQL, and I couldn’t run
ZwCreateFile if I wanted to.

Does anyone get IO requests at IRQL < DIRQL? What a concept! :slight_smile:

Phil

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, January 24, 2001 2:31 PM
To: NT Developers Interest List
Subject: [ntdev] Re: how to open a network mapped file

Pardon my ignorance, but what other context would you be in?

In the context of the user process who issued a syscall or page fault.

would *probably* be calling ZwCreateFile during init only, hence in a
system
process context, or am I mistaken?

Then you will not be able to access the files on the network. The problem is
because the LocalSystem account has no password information associated with
it and thus cannot issue the credentials to logon to the SMB server.
So - NO code running under LocalSystem can access the SMB shares.

The situation is IIRC a bit different on w2k when you can make your
LocalSystem account known to other machines - but it requires special
network setup.

Max


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


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