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.

59 lines
1.4 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1995, Microsoft Corporation.
  4. //
  5. // File: DUMPSEC.hxx
  6. //
  7. // Contents: class encapsulating file security.
  8. //
  9. // Classes: CDumpSecurity
  10. //
  11. // History: Nov-93 Created DaveMont
  12. //
  13. //--------------------------------------------------------------------
  14. #ifndef __DUMPSEC__
  15. #define __DUMPSEC__
  16. #include <t2.hxx>
  17. //+-------------------------------------------------------------------
  18. //
  19. // Class: CDumpSecurity
  20. //
  21. // Purpose: encapsulation of NT File security descriptor with functions
  22. // to get SIDs and iterate through the ACES in the DACL.
  23. //
  24. //--------------------------------------------------------------------
  25. class CDumpSecurity
  26. {
  27. public:
  28. CDumpSecurity(WCHAR *filename);
  29. ~CDumpSecurity();
  30. ULONG Init();
  31. ULONG GetSDOwner(SID **psid);
  32. ULONG GetSDGroup(SID **pgsid);
  33. VOID ResetAce(SID *psid);
  34. LONG GetNextAce(ACE_HEADER **paceh);
  35. BOOL IsDaclNull() const { return _bNullDacl;}
  36. private:
  37. BYTE * _psd ;
  38. CHAR * _pfilename ;
  39. WCHAR * _pwfilename ;
  40. ACL * _pdacl ;
  41. ACE_HEADER * _pah ;
  42. SID * _psid ;
  43. ULONG _cacethissid; // a dinosaur from the cretaceous
  44. BOOL _bNullDacl;
  45. };
  46. #endif // __DUMPSEC__