Developed a Windows 7 driver that allows a 1MB battery-backed RAM to appear as a hard drive to the system. Started with the WDK RamDisk sample and made the necessary changes. The driver works fine as long as I am the adminsitrator.
If I log in as a user, the drive is not accessible. I tried to change the properties of the drive but nothing I change sticks. Is there something I am missing that controls the security of the device?
> Developed a Windows 7 driver that allows a 1MB battery-backed RAM to appear as a hard drive to the system. Started with the WDK RamDisk sample and made the necessary changes. The driver works fine as long as I am the adminsitrator. > > If I log in as a user, the drive is not accessible. I tried to change the properties of the drive but nothing I change sticks. Is there something I am missing that controls the security of the device? > > Thanks in advance.
Presumably, this device has an interface, such as iSCSI, PCI, USB, etc.
It might help if you mentioned this.
For example, my multi-terabyte RAID array has an iSCSI interface, but
every time the server boots, the device is inaccessible except to
administrators. I’ve been told it has something to do with the iSCSI
initiator coming up at the wrong time. Nobody seems to know how to fix
this. Each time I have to go in and reset the permissions. Fortunately,
I run Windows Server so it only gets rebooted about four times a year.
joe
Developed a Windows 7 driver that allows a 1MB battery-backed RAM to
appear as a hard drive to the system. Started with the WDK RamDisk sample
and made the necessary changes. The driver works fine as long as I am the
adminsitrator.
If I log in as a user, the drive is not accessible. I tried to change the
properties of the drive but nothing I change sticks. Is there something I
am missing that controls the security of the device?
> It is actually a proprietary interface through a FPGA. The FPGA is accessed through the LPC bus via an Intel ICH8 device. > > Maybe the answer is you must be the adminsitrator to use the device. > > Thanks for the input.
Is this a WDF driver? By default, KMDF will use a restrictive SDDL for the device
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@winsystems.com
Sent: Monday, February 06, 2012 1:46 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Need Windows 7 RamDisk Driver Assistance
If you are using IoCreateDevice it will restrict things to administrator
only, and as Doron mentioned the default action of WDF is similar. If
this is a WDM driver change IoCreateDevice to IoCreateDeviceSecure with
an appropriate SDDL string, if this is WDF driver use
WdfDeviceInitAssignSDDLString assign the SDDL string.
As don suggested, call WdfDeviceInitAssignSDDLString
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@winsystems.com
Sent: Monday, February 06, 2012 1:56 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Need Windows 7 RamDisk Driver Assistance
Yes, the creation function used is WdfDeviceCreate. How can I alter the SDDL?
I suppose your iSCSI device is registered as a persistent target? You can make the system startup wait for it to come up. The iSCSI control panel has the necessary settings.
If you don’t mind I am going to ask another question in this thread. When I right-click on this drive and select “Format…”, nothing happens. How do I redirect this command to my driver’s format function? Is this an IOCTL_DISK call?
Are you supporting the various IOCTL_DISK_XXX and IOCTL_STORAGE_XXX
calls? You should be taking a look at the disk.sys sample code in the
WDK, since if that driver supports it you should.
> This worked perfectly!! Thanks. > > If you don’t mind I am going to ask another question in this thread. When I right-click on this drive and select “Format…”, nothing happens. How do I redirect this command to my driver’s format function? Is this an IOCTL_DISK call?
I think you need to interact with the mount manager and its set of IOCTLs vs exposing a fully baked disk with a drive letter that you pick.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@winsystems.com
Sent: Monday, February 06, 2012 3:45 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Need Windows 7 RamDisk Driver Assistance
This worked perfectly!! Thanks.
If you don’t mind I am going to ask another question in this thread. When I right-click on this drive and select “Format…”, nothing happens. How do I redirect this command to my driver’s format function? Is this an IOCTL_DISK call?
>select “Format…”, nothing happens. How do I redirect this command to my driver’s format function?
Disk drivers has no format calls, except the low-level format which has nothing to do with the Format feature of Windows (and IIRC actually used for some DVD-RW and BluRay media only).
For Windows Format to work, you must properly support all sizing IOCTLs (“get length info” and such) in your code.