Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.2 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1995, Microsoft Corporation.
  4. //
  5. // File: FILESEC.hxx
  6. //
  7. // Contents: class encapsulating file security.
  8. //
  9. // Classes: CFileSecurity
  10. //
  11. // History: Nov-93 Created DaveMont
  12. //
  13. //--------------------------------------------------------------------
  14. #ifndef __FILESEC__
  15. #define __FILESEC__
  16. #include <t2.hxx>
  17. #include <daclwrap.hxx>
  18. //+-------------------------------------------------------------------
  19. //
  20. // Class: CFileSecurity
  21. //
  22. // Purpose: encapsulation of File security, this class wraps the
  23. // NT security descriptor for a file, allowing application
  24. // of a class that wraps DACLS to it, thus changing the
  25. // acces control on the file.
  26. //
  27. //--------------------------------------------------------------------
  28. class CFileSecurity
  29. {
  30. public:
  31. CFileSecurity(WCHAR *filename);
  32. ~CFileSecurity();
  33. ULONG Init();
  34. // methods to actually set the security on the file
  35. ULONG SetFS(BOOL fmodify, CDaclWrap *pcdw, BOOL fdir);
  36. private:
  37. BYTE * _psd ;
  38. WCHAR * _pwfilename ;
  39. };
  40. #endif // __FILESEC__