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.

63 lines
1.6 KiB

  1. /*****************************************************************************/
  2. /* Copyright (c) 2000-2001 Microsoft Corporation, All Rights Reserved /
  3. /*****************************************************************************/
  4. /*
  5. * SecureKernelObj.h - header file for CSecureKernelObj class.
  6. *
  7. * Created: 11-27-00 by Kevin Hughes
  8. *
  9. */
  10. #pragma once
  11. ////////////////////////////////////////////////////////////////
  12. //
  13. // Class: CSecureKernelObj
  14. //
  15. // This class is intended to encapsulate the security of an
  16. // NT kernel securable object. It inherits off of CSecurityDescriptor
  17. // and it is that class to which it passes Security Descriptors
  18. // it obtains, and from which it receives previously built
  19. // security descriptors to apply. It supplies implementations
  20. // for AllAccessMask(), WriteOwner() and WriteAcls().
  21. //
  22. ////////////////////////////////////////////////////////////////
  23. class CSecureKernelObj : public CSecurityDescriptor
  24. {
  25. // Constructors and destructor
  26. public:
  27. CSecureKernelObj();
  28. CSecureKernelObj(
  29. HANDLE hObject,
  30. BOOL fGetSACL = TRUE);
  31. CSecureKernelObj(
  32. HANDLE hObject,
  33. PSECURITY_DESCRIPTOR pSD);
  34. virtual ~CSecureKernelObj();
  35. DWORD SetObject(
  36. HANDLE hObject,
  37. BOOL fGetSACL = TRUE);
  38. virtual DWORD AllAccessMask(void);
  39. virtual DWORD WriteOwner(PSECURITY_DESCRIPTOR pAbsoluteSD);
  40. virtual DWORD WriteAcls(
  41. PSECURITY_DESCRIPTOR pAbsoluteSD,
  42. SECURITY_INFORMATION securityinfo);
  43. private:
  44. HANDLE m_hObject;
  45. };