Ignore:
Timestamp:
2/12/2010 12:56:35 PM (2 years ago)
Author:
lowjoel
Message:

Instead of hardcoding 0x80 to be passed to CreateFile?, use the named constant FILE_READ_ATTRIBUTES. Also, use this flag when querying NTFS volume information so that non-administrators can query NTFS volume information (e.g. MFT record size)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser6/Eraser.Util/NtfsApi.cs

    r1802 r1841  
    6161            using (SafeFileHandle volumeHandle = NativeMethods.CreateFile( 
    6262                volume.VolumeId.Remove(volume.VolumeId.Length - 1), 
    63                 NativeMethods.GENERIC_READ, NativeMethods.FILE_SHARE_READ | 
     63                NativeMethods.FILE_READ_ATTRIBUTES, NativeMethods.FILE_SHARE_READ | 
    6464                NativeMethods.FILE_SHARE_WRITE, IntPtr.Zero, NativeMethods.OPEN_EXISTING, 
    6565                0, IntPtr.Zero)) 
Note: See TracChangeset for help on using the changeset viewer.