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.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 "openfilesdef.h"
  17. VOID * Add2Ptr(VOID *pv, ULONG cb);
  18. //+-------------------------------------------------------------------
  19. //
  20. // Class: CDumpSecurity
  21. //
  22. // Purpose: encapsulation of NT File security descriptor with functions
  23. // to get SIDs and iterate through the ACES in the DACL.
  24. //
  25. //--------------------------------------------------------------------
  26. class CDumpSecurity
  27. {
  28. public:
  29. CDumpSecurity(BYTE *psd);
  30. ~CDumpSecurity();
  31. ULONG Init();
  32. ULONG GetSDOwner(SID **psid);
  33. ULONG GetSDGroup(SID **pgsid);
  34. VOID ResetAce(SID *psid);
  35. LONG GetNextAce(ACE_HEADER **paceh);
  36. private:
  37. BYTE * _psd ;
  38. ACL * _pdacl ;
  39. ACE_HEADER * _pah ;
  40. SID * _psid ;
  41. ULONG _cacethissid; // a dinosaur from the cretaceous
  42. };
  43. #endif // __DUMPSEC__