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.

70 lines
1.7 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. wsuser.h
  5. Abstract:
  6. This module contains the macros, user defined structures & function
  7. definitions needed by whoami.cpp, wsuser.cpp, wssid.cpp and
  8. wspriv.cppfiles.
  9. Authors:
  10. Christophe Robert
  11. Revision History:
  12. 02-July-2001 : Updated by Wipro Technologies.
  13. --*/
  14. #ifndef WSUSER_H
  15. #define WSUSER_H
  16. #include "wspriv.h"
  17. #include "wssid.h"
  18. #include "wstoken.h"
  19. class WsUser {
  20. protected:
  21. WsAccessToken wToken ; // The token
  22. WsPrivilege **lpPriv ; // Privileges
  23. WsSid wUserSid ; // User SID
  24. WsSid *lpLogonId ; // Logon ID
  25. WsSid **lpwGroups ; // The groups
  26. DWORD dwnbGroups ; // nb of groups
  27. DWORD dwnbPriv ; // nb of privileges
  28. public:
  29. WsUser ( VOID ) ;
  30. ~WsUser ( VOID ) ;
  31. DWORD Init ( VOID ) ;
  32. DWORD DisplayLogonId () ;
  33. DWORD DisplayUser ( IN DWORD dwFormat,
  34. IN DWORD dwNameFormat) ;
  35. DWORD DisplayGroups ( IN DWORD dwFormat ) ;
  36. DWORD DisplayPrivileges ( IN DWORD dwFormat ) ;
  37. VOID GetDomainType ( IN DWORD NameUse,
  38. OUT LPWSTR szSidNameUse,
  39. IN DWORD dwSize ) ;
  40. } ;
  41. //width constants for the fields
  42. #define PRIVNAME_COL_NUMBER 0
  43. #define PRIVDESC_COL_NUMBER 1
  44. #define PRIVSTATE_COL_NUMBER 2
  45. #define WIDTH_LOGONID 77
  46. #endif