Thank you for your answer. Could you tell me I can read which document about the difference of FAT and NTFS in security?
The dispatch routine to process IRP_MJ_CREATE is very simple, it just return success.
I call CreateFile() with the following parameters:
handle = CreateFile(
VolumeName,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_NO_BUFFERING,
NULL);
when the deviceIoctl complete, use CloseHandle() to close it.
I noticed that in Win2000, it's ok. In WinXP, when using NTFS, it's ok, too.
----- Original Message -----
From: Dsingh@in.safenet-inc.com
To: Windows System Software Devs Interest List
Sent: Thursday, October 14, 2004 2:40 PM
Subject: RE: [ntdev] Does CreateFile() executes differently with FAT32 and NTFS ?
Hi,
I m not a FSD guy and this response may not be of much use. But in general FAT and NTFS are differ only in way of security. You may be using some security descriptors or flags which is/are not supported on FAT. Providing code snippet would be a good idea, some champ here may give you some better answer then me in that case ;-).
Dev
-----Original Message-----
From: Bruce Zhang [mailto:xxxxx@vip.sina.com]
Sent: Thursday, October 14, 2004 9:05 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Does CreateFile() executes differently with FAT32 and NTFS ?
Hi All,
I wrote a encryption virtual disk driver. After mounted, the virtual disk devices created by the driver doesn't process any read/write/deviceioctl until a deviceioctl to authenticate user password has been passed. Another deviceIoctl is to make the authentication null, after this, the driver denies read/write/deviceioctl again until another authentication executed successfully. I use CreateFile() to open handle of the device before every deviceIoctl, and after execution of deviceIoctl, I call CloseHandle to close it.
In Windows 2000, the driver works well.
In Windows XP, the driver works well if the virtual disk is formatted into NTFS.
But if the virtual disk is formatted into FAT32, there is a problem!
Firstly, the virtual disk is mounted as a volume(such as Z: partition);
Secondly, the application call authentication deviceIoctl to verify user property;
-----Now we can use the virtual disk like a physical disk.
Then the application call the deviceIoctl to nullify the authentication;
-----Now the virtual disk denies all access.
Here comes the problem, Now if I want to get handle of the device, the CreateFile() function return failed! GetLastError() return error code 1(ERROR_INVALID_FUNCTION).
Who can tell me why I get different result for NTFS and FAT32?
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@vip.sina.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@vip.sina.com
To unsubscribe send a blank email to xxxxx@lists.osr.com