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.

57 lines
1.3 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. private:
  36. BYTE * _psd ;
  37. CHAR * _pfilename ;
  38. WCHAR * _pwfilename ;
  39. ACL * _pdacl ;
  40. ACE_HEADER * _pah ;
  41. SID * _psid ;
  42. ULONG _cacethissid; // a dinosaur from the cretaceous
  43. };
  44. #endif // __DUMPSEC__