1

I'm writing a Windows device driver for a custom USB device, but am having trouble opening the device from my user program (using CreateFile) when the user program is run as a domain user. If I run as a local user, or as an administrator (or 'Run As' administrator) I can open the driver fine, but as a domain user GetLastError returns 5 (access denied).

I originally had this problem with local users too, and found I had to add the following SDDL entry to the .inf file, which solved the problem for local users:

HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;GRGW;;;BU)

From this reference: http://msdn.microsoft.com/en-us/library/windows/hardware/ff563667(v=vs.85).aspx

When I discovered that domain users did not have access I thought that simply adding them to this SDDL entry would give them access, but it doesn't seem to work: I still get access denied. I've even tried extreme solutions such as giving all users (everyone (WD), unauthenticated users etc.) full access, but this doesn't work either, which makes me think the problem lies elsewhere; i.e. something else is denying domain users access which takes precedent over the permit in the SDDL entry in the driver inf.

So my question is, what am I missing that is required to give domain users (or all users) access to connect to the driver? Or are there any other solutions to this problem (such as connecting to the driver as a service and then accessing this service from the user program)?

Echilon
  • 10,064
  • 33
  • 131
  • 217
JohnSwap
  • 11
  • 3

1 Answers1

0

HKR,,Security,,"D:P(A;;GA;;;WD)"

set everyone can access, try it!

jim ying
  • 361
  • 4
  • 17