Leaked source code of windows server 2003
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.

53 lines
1.2 KiB

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