NDIS Sample Driver - Access Denied

Hi All,

I am pretty sure that my problem is too easy to solve it, but I understand nothing.

I am using : WINDDK 7600.16385.0.
I am building the sample ndisprot 5x for Windows Seven. (7600.16385.0\src\network\ndis\ndisprot\5x\sys)
I am using the test ample program for this drivers 7600.16385.0\src\network\ndis\ndisprot\5x\test).

If I start the test program in non Adminstrator, I have an error (5) on CreateFile : Access Denied.

The inf file has no “security” informationin INF file. If I need to add this kind of information, how I can do this.

Thanks to all.
note: I do some research on the forum wihtout success

I assume that you have already started the driver using “net start
ndisprot”.

You can try a different SSDL in your call to IoCreateDeviceSecure:

SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RWX_RES_RWX

Good luck,

Thomas F. Divine
http://www.pcausa.com


From:
Sent: Monday, December 07, 2009 9:09 AM
To: “Windows System Software Devs Interest List”
Subject: [ntdev] NDIS Sample Driver - Access Denied

> Hi All,
>
> I am pretty sure that my problem is too easy to solve it, but I understand
> nothing.
>
> I am using : WINDDK 7600.16385.0.
> I am building the sample ndisprot 5x for Windows Seven.
> (7600.16385.0\src\network\ndis\ndisprot\5x\sys)
> I am using the test ample program for this drivers
> 7600.16385.0\src\network\ndis\ndisprot\5x\test).
>
> If I start the test program in non Adminstrator, I have an error (5) on
> CreateFile : Access Denied.
>
> The inf file has no “security” informationin INF file. If I need to add
> this kind of information, how I can do this.
>
> Thanks to all.
> note: I do some research on the forum wihtout success
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Did you look at the driver code? You are specifying that only system and
administrators can access your device.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@molex.com
Sent: Monday, December 07, 2009 9:09 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] NDIS Sample Driver - Access Denied

Hi All,

I am pretty sure that my problem is too easy to solve it, but I understand
nothing.

I am using : WINDDK 7600.16385.0.
I am building the sample ndisprot 5x for Windows Seven.
(7600.16385.0\src\network\ndis\ndisprot\5x\sys)
I am using the test ample program for this drivers
7600.16385.0\src\network\ndis\ndisprot\5x\test).

If I start the test program in non Adminstrator, I have an error (5) on
CreateFile : Access Denied.

The inf file has no “security” informationin INF file. If I need to add this
kind of information, how I can do this.

Thanks to all.
note: I do some research on the forum wihtout success


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

If I start the test program in non Adminstrator, I have an error (5) on
CreateFile : Access Denied.
If you use CMD.exe to execute test.exe, maybe you need more privilege. Try run as Administrator!

Great ! Many thanks to Thomas Divine and Bill Wandel !
I am OK, if I read the source code, I am specifying that only system and
administrators can access your device. But as it is a sample it is not really me ;-).
I updated the source code:
before:
status = IoCreateDeviceSecure(pDriverObject,
0,
&ntDeviceName,
FILE_DEVICE_NETWORK,
FILE_DEVICE_SECURE_OPEN,
FALSE,
&SDDL_DEVOBJ_SYS_ALL_ADM_ALL
NULL,
&deviceObject);
After:
status = IoCreateDeviceSecure(pDriverObject,
0,
&ntDeviceName,
FILE_DEVICE_NETWORK,
FILE_DEVICE_SECURE_OPEN,
FALSE,
&SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RWX_RES_RWX,
NULL,
&deviceObject);

Now it is OK.

Many Many Many thanks.

This post is closed.