home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / winnt / cacls / dumpsec.hxx < prev    next >
Text File  |  1995-03-13  |  1KB  |  58 lines

  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.  
  17. #include <t2.hxx>
  18.  
  19. //+-------------------------------------------------------------------
  20. //
  21. //  Class:      CDumpSecurity
  22. //
  23. //  Purpose:    encapsulation of NT File security descriptor with functions
  24. //              to get SIDs and iterate through the ACES in the DACL.
  25. //
  26. //--------------------------------------------------------------------
  27. class CDumpSecurity
  28. {
  29. public:
  30.  
  31.     CDumpSecurity(WCHAR *filename);
  32.  
  33.    ~CDumpSecurity();
  34.  
  35. ULONG Init();
  36. ULONG GetSDOwner(SID **psid);
  37. ULONG GetSDGroup(SID **pgsid);
  38. VOID  ResetAce(SID *psid);
  39. LONG  GetNextAce(ACE_HEADER **paceh);
  40.  
  41. private:
  42.  
  43.     BYTE       * _psd        ;
  44.     CHAR       * _pfilename  ;
  45.     WCHAR      * _pwfilename ;
  46.     ACL        * _pdacl      ;
  47.     ACE_HEADER * _pah        ;
  48.     SID        * _psid       ;
  49.     ULONG        _cacethissid;  // a dinosaur from the cretaceous
  50. };
  51.  
  52. #endif // __DUMPSEC__
  53.  
  54.  
  55.  
  56.  
  57.  
  58.