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.

68 lines
905 B

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. impersonation.hxx
  6. Abstract:
  7. This file provides useful accssors and mutators.
  8. Author:
  9. Larry Zhu (LZhu) January 14, 2002
  10. Environment:
  11. User Mode -Win32
  12. Revision History:
  13. --*/
  14. #ifndef PRIV_HXX
  15. #define PRIV_HXX
  16. #ifdef __cplusplus
  17. class TPrivilege
  18. {
  19. SIGNATURE('priv');
  20. public:
  21. TPrivilege(
  22. IN ULONG Privilege,
  23. IN BOOLEAN bEnable
  24. );
  25. ~TPrivilege(
  26. VOID
  27. );
  28. NTSTATUS
  29. Validate(
  30. VOID
  31. ) const;
  32. private:
  33. NO_COPY(TPrivilege)
  34. NTSTATUS
  35. Initialize(
  36. VOID
  37. );
  38. ULONG m_Privilege;
  39. BOOLEAN m_bEnable;
  40. HANDLE m_hToken;
  41. TNtStatus m_Status;
  42. };
  43. #endif // #ifdef __cplusplus
  44. #endif // #ifndef IMPERSONATION_HXX