Re: How to mount a volume as a current user.
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Tue, 6 May 2008 19:29:40 -0700
Use SUBST to create a session-local mapping.
Creating a reparse point will affect all users and is persistent. Because of
that, it requires admin privileges.
"JPB" <JPB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:288AFF89-E6F6-4C61-88B7-A589AFE123E5@xxxxxxxxxxxxxxxx
Sorry David,
The driver I wrote is not the trouble.
Look on your XP.
Create a normal local or domain user.
Use mountvol.exe to mount yours CDROM on C:\mnt\cdrom. I receive an access
denied.
So my question is How can a user mount a volume? What is the security
point ?
Thanks in advance.
"David Craig" wrote:
This is the wrong newsgroup for your question. It is NOT about how to do
this from a user mode app, but how to do it correctly from the driver.
Look
at the mount*.h header files in the WDK for clues. Also look at the
source
code for disk.sys in the WDK. Not all that difficult.
"JPB" <JPB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A18DD0F7-9773-4C8B-9F21-A0E10491820D@xxxxxxxxxxxxxxxx
Hi,
I wrote some piece of code using the API "SetVolumeMountPoint" wich
allow
me
to mount a volume wich looks like \\?\Volume{GUID} (I create myself
this
volume from my own driver) in an NTFS folder.
It works as far as my process run as an user from the "administrators"
group, but when I try tu run it as a normal user I receive an "access
denied".
As in Vista I get also an "access denied" when my process run as an
user
from the "administrators" group I dig the users access right (former
privilege) but no success.
I know how to put NTFS rights on the root of the volume I mount. But
I'am
not so clear with the access right of the "\\?\Volume{GUID}" object.
Is this object just a link on the internal "\device\Mydriver" object ?
As
swhon in WinObj (Sysinternals tool).
How can I change the DACL of this object ?
Do have I to change the acces rights of "\device\Mydriver" (deficult
for
me
I'am not allowed to use IoCreateDeviceSecure to run from W2K to Vista)
?
So can anybody can help me to use Mountvol.exe as a user ?
Thanks in advance.
Cheers
PS : last solution will be to mount from a service, but I'am a bit
upset
to
create a service just for that !
.
- Follow-Ups:
- References:
- How to mount a volume as a current user.
- From: JPB
- Re: How to mount a volume as a current user.
- From: David Craig
- Re: How to mount a volume as a current user.
- From: JPB
- How to mount a volume as a current user.
- Prev by Date: Re: How to mount a volume as a current user.
- Next by Date: Application frequently gets hung after calling a COM method
- Previous by thread: Re: How to mount a volume as a current user.
- Next by thread: Re: How to mount a volume as a current user.
- Index(es):
Relevant Pages
|