Re: CreateFile() returns ERROR_ACCESS_DENIED to the user



Thanks Anton,
my guess was that, at least, open, close and DeviceIoControl was allowed
.....
How can i solve ?
Do i must modify user rights or driver rights ????

Thanks
--
SteM


"anton bassov" <soviet_bloke@xxxxxxxxxxx> ha scritto nel messaggio
news:1163436308.076405.201750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi mate

This is just absolutely normal default behaviour - limited users have
no access to devices by default. If you want non-privileged users to
gain access to it, you have to EXPLICITLY allow the above (it is
understandable that it can be done only from the Admin account)

Anton Bassov


SteM wrote:
Hello,
I've written a small wdm driver for Win2000 to access an old custom hw
on
parallel port.
The accesses are via a couple of DeviceIoControl() custom commands.
It works fine, does exactly what i intended; however, it only works if I
am
logged in as Administrator (or equivalent).
If I log in as a regular user (Power User) the call to CreateFile fails
with
ACCESS_DENIED.

// Open driver
rv = CreateFile (
ifDetail->DevicePath,
0, // Desidered access
0, // Share mode
NULL, // Security attrb
CREATE_NEW, // How to create
FILE_FLAG_DELETE_ON_CLOSE, // File attribute
NULL // Template file
);

if (rv==INVALID_HANDLE_VALUE)
{
......



Thanks in advance for any pointers...
--
SteM



.



Relevant Pages

  • Re: IST in C# application
    ... The current driver is doing that with ... you have to use DeviceIoControl() API to ... I do not want to handle the IRQ source identification in the ISR (to ... it is not a standard way to handle interrupts ...
    (microsoft.public.windowsce.platbuilder)
  • Re: calling DLL from a Device Drive
    ... DeviceIoControl function to communicate with your driver. ... The inverted call _is_ the most reliable and robust method for this purpose can can be used effectively in managed languages. ...
    (microsoft.public.development.device.drivers)
  • Re: Setting OID_802_11_BSSID through DeviceIOControl()
    ... I did not write a specific driver myself. ... DeviceIOControl() function, I can query all the OIDs of interest without any ... // Construct a device name to pass to CreateFile ... I tried both with WZC running or stopped, ...
    (microsoft.public.development.device.drivers)
  • Re: Setting OID_802_11_BSSID through DeviceIOControl()
    ... Maxim Shatskih, Windows DDK MVP ... I did not write a specific driver myself. ... DeviceIOControl() function, I can query all the OIDs of interest without any ...
    (microsoft.public.development.device.drivers)
  • Re: WDM streaming driver and user mode interaction
    ... In your driver what you get is SRB_GET_DEVICE_PROPERTY. ... property item dwPropId. ... It is more than enough to cover all your needs as far as IOCTL are ... >> You can use that file handle to call DeviceIoControl. ...
    (microsoft.public.development.device.drivers)