home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winbase / security / winnt / secfile / readme.txt < prev    next >
Encoding:
Text File  |  1996-04-19  |  1.1 KB  |  28 lines

  1. File Security
  2.  
  3.  
  4. The SECFILE sample demonstrates the following security-related activities:
  5.  
  6.  - Constructing well-known security identifiers (SIDs)
  7.  - Obtaining the current user's SID
  8.  - Building a discretionary access control list (DACL)
  9.  - Building a security descriptor (SD)
  10.  
  11. You should use this sample in conjunction with the Win32 Programmer's Reference.
  12. Looking at the documentation and an example function call should make both 
  13. the documentation and the sample clearer.
  14.  
  15. This sample only works on an NTFS partition. No other file system supports 
  16. security. You can use File Manager or the Windows Explorer to check the 
  17. security on the file after you run the sample. One thing you may notice is 
  18. that the user "Everyone" has "Special" access instead of "Read" access. 
  19. That's because the system considers "Read" access to include both read and 
  20. execute rights. To modify the sample to give "Everyone" "Read" access, 
  21. change the statement:
  22.  
  23.     #define WORLD_ACCESS  GENERIC_READ
  24.  
  25. to the following:
  26.  
  27.     #define WORLD_ACCESS  (GENERIC_READ | GENERIC_EXECUTE)
  28.