Source code of Windows XP (NT5)
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.

49 lines
1.8 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: TokenGroups.h
  3. //
  4. // Copyright (c) 1999-2000, Microsoft Corporation
  5. //
  6. // Classes related to authentication for use in neptune logon
  7. //
  8. // History: 1999-09-13 vtan created
  9. // 2000-02-01 vtan moved from Neptune to Whistler
  10. // --------------------------------------------------------------------------
  11. #ifndef _TokenGroups_
  12. #define _TokenGroups_
  13. // --------------------------------------------------------------------------
  14. // CTokenGroups
  15. //
  16. // Purpose: This class creates a TOKEN_GROUPS struct for use in several
  17. // different security related functions such as for
  18. // secur32!LsaLogonUser which includes the owner SID as
  19. // well as the logon SID passed in.
  20. //
  21. // History: 1999-08-17 vtan created
  22. // 1999-09-13 vtan increased functionality
  23. // 2000-02-01 vtan moved from Neptune to Whistler
  24. // --------------------------------------------------------------------------
  25. class CTokenGroups
  26. {
  27. public:
  28. CTokenGroups (void);
  29. ~CTokenGroups (void);
  30. const TOKEN_GROUPS* Get (void) const;
  31. NTSTATUS CreateLogonGroup (PSID pLogonSID);
  32. NTSTATUS CreateAdministratorGroup (void);
  33. static NTSTATUS StaticInitialize (void);
  34. static NTSTATUS StaticTerminate (void);
  35. private:
  36. static PSID s_localSID;
  37. static PSID s_administratorSID;
  38. PTOKEN_GROUPS _pTokenGroups;
  39. };
  40. #endif /* _TokenGroups_ */