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.

42 lines
904 B

  1. //+-------------------------------------------------------------------
  2. //
  3. // File: secdes.hxx
  4. //
  5. // Contents: Encapsulates a Win32 security descriptor.
  6. //
  7. // Classes: CSecurityDescriptor
  8. //
  9. // Functions: none
  10. //
  11. // History: 07-Aug-92 randyd Created.
  12. //
  13. //--------------------------------------------------------------------
  14. #ifndef __SECDES_HXX__
  15. #define __SECDES_HXX__
  16. #include <windows.h>
  17. class CSecurityDescriptor
  18. {
  19. public:
  20. // Default constructor creates a descriptor that allows all access.
  21. CSecurityDescriptor()
  22. {
  23. InitializeSecurityDescriptor(&_sd, SECURITY_DESCRIPTOR_REVISION);
  24. };
  25. // Return a PSECURITY_DESCRIPTOR
  26. operator PSECURITY_DESCRIPTOR() const {return((PSECURITY_DESCRIPTOR) &_sd); };
  27. private:
  28. // The security descriptor.
  29. SECURITY_DESCRIPTOR _sd;
  30. };
  31. #endif // __SECDES_HXX__