I have written a NDIS IM device driver and I used IOCTRL
to communicate between my user mode app and the device
driver. It works fine when logged on as Administrator but
createfile fails (access denied) when logged on as
limited user. Anyone know how to get around this?

I called create file with the following attributes.
CreateFile
(TEXT"\\\\.\\MyDriver"),
GENERIC_WRITE | GENERIC_READ, 0, 0,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL |FILE_FLAG_OVERLAPPED, 0);

Is this to do with how I installed the driver or the way
I called createfile?

Createfile failed(access denied) when logged on as limited user by ido

ido
Thu Dec 18 09:13:30 CST 2003

We are looking for the same thing and we don't have the
answer till now. It's possible that there is no answer


>-----Original Message-----
>I have written a NDIS IM device driver and I used IOCTRL
>to communicate between my user mode app and the device
>driver. It works fine when logged on as Administrator but
>createfile fails (access denied) when logged on as
>limited user. Anyone know how to get around this?
>
>I called create file with the following attributes.
>CreateFile
>(TEXT"\\\\.\\MyDriver"),
>GENERIC_WRITE | GENERIC_READ, 0, 0,
>OPEN_EXISTING,
>FILE_ATTRIBUTE_NORMAL |FILE_FLAG_OVERLAPPED, 0);
>
>Is this to do with how I installed the driver or the way
>I called createfile?
>.
>

Re: Createfile failed(access denied) when logged on as limited user by Farooque

Farooque
Thu Dec 18 23:14:23 CST 2003

See Ken's other post in this newsgroup about the same
question, he seemed to have figured it out, unfortunately,
it still does not work for me :(

--

-Farooque Khan
http://farooque.150m.com




"ido shilo" <ishilo@sandisk.com> wrote in message
news:0b1301c3c579$7eb965e0$a601280a@phx.gbl...
> We are looking for the same thing and we don't have the
> answer till now. It's possible that there is no answer
>
>
> >-----Original Message-----
> >I have written a NDIS IM device driver and I used IOCTRL
> >to communicate between my user mode app and the device
> >driver. It works fine when logged on as Administrator but
> >createfile fails (access denied) when logged on as
> >limited user. Anyone know how to get around this?
> >
> >I called create file with the following attributes.
> >CreateFile
> >(TEXT"\\\\.\\MyDriver"),
> >GENERIC_WRITE | GENERIC_READ, 0, 0,
> >OPEN_EXISTING,
> >FILE_ATTRIBUTE_NORMAL |FILE_FLAG_OVERLAPPED, 0);
> >
> >Is this to do with how I installed the driver or the way
> >I called createfile?
> >.
> >



Re: Createfile failed(access denied) when logged on as limited user by Nar

Nar
Wed Dec 24 22:49:43 CST 2003

Most likely the security descriptor on the device object only allows admins
all access. Did you explicitly set a security descriptor on the device using
IoCreateDeviceSecure or an INF ? If not you most likely got the default
security descriptor. You can find the default security descriptor using the
objdir tool shipped with the DDK.

Use objdir /d <Your device name> The bit fields of the access mask are
defined in wdm.h. An extract is given below.


//
// Define access rights to files and directories
//

//
// The FILE_READ_DATA and FILE_WRITE_DATA constants are also defined in
// devioctl.h as FILE_READ_ACCESS and FILE_WRITE_ACCESS. The values for
these
// constants *MUST* always be in sync.
// The values are redefined in devioctl.h because they must be available to
// both DOS and NT.
//

#define FILE_READ_DATA ( 0x0001 ) // file & pipe
#define FILE_LIST_DIRECTORY ( 0x0001 ) // directory

#define FILE_WRITE_DATA ( 0x0002 ) // file & pipe
#define FILE_ADD_FILE ( 0x0002 ) // directory

#define FILE_APPEND_DATA ( 0x0004 ) // file
#define FILE_ADD_SUBDIRECTORY ( 0x0004 ) // directory
#define FILE_CREATE_PIPE_INSTANCE ( 0x0004 ) // named pipe


#define FILE_READ_EA ( 0x0008 ) // file & directory

#define FILE_WRITE_EA ( 0x0010 ) // file & directory

#define FILE_EXECUTE ( 0x0020 ) // file
#define FILE_TRAVERSE ( 0x0020 ) // directory

#define FILE_DELETE_CHILD ( 0x0040 ) // directory

#define FILE_READ_ATTRIBUTES ( 0x0080 ) // all

#define FILE_WRITE_ATTRIBUTES ( 0x0100 ) // all

--
Nar Ganapathy
Windows Core OS group
This posting is provided "AS IS" with no warranties, and confers no rights.

"ido shilo" <ishilo@sandisk.com> wrote in message
news:0b1301c3c579$7eb965e0$a601280a@phx.gbl...
> We are looking for the same thing and we don't have the
> answer till now. It's possible that there is no answer
>
>
> >-----Original Message-----
> >I have written a NDIS IM device driver and I used IOCTRL
> >to communicate between my user mode app and the device
> >driver. It works fine when logged on as Administrator but
> >createfile fails (access denied) when logged on as
> >limited user. Anyone know how to get around this?
> >
> >I called create file with the following attributes.
> >CreateFile
> >(TEXT"\\\\.\\MyDriver"),
> >GENERIC_WRITE | GENERIC_READ, 0, 0,
> >OPEN_EXISTING,
> >FILE_ATTRIBUTE_NORMAL |FILE_FLAG_OVERLAPPED, 0);
> >
> >Is this to do with how I installed the driver or the way
> >I called createfile?
> >.
> >