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.

96 lines
1.7 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1997
  6. //
  7. // File: sidcache.h
  8. //
  9. // Contents: public types & functions used for logon sid caching
  10. //
  11. //
  12. // History: 27-May-1998 MikeSw Created
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __SIDCACHE_H__
  16. #define __SIDCACHE_H__
  17. //
  18. // This structure is marshalled
  19. //
  20. typedef struct _KERB_SID_CACHE_ENTRY {
  21. KERBEROS_LIST_ENTRY Next;
  22. ULONG_PTR Base;
  23. ULONG Size;
  24. ULONG Version;
  25. PSID Sid;
  26. UNICODE_STRING LogonUserName;
  27. UNICODE_STRING LogonDomainName;
  28. UNICODE_STRING LogonRealm;
  29. } KERB_SID_CACHE_ENTRY, *PKERB_SID_CACHE_ENTRY;
  30. #ifndef WIN32_CHICAGO
  31. NTSTATUS
  32. KerbInitializeLogonSidCache(
  33. VOID
  34. );
  35. PKERB_SID_CACHE_ENTRY
  36. KerbLocateLogonSidCacheEntry(
  37. IN PUNICODE_STRING LogonUserName,
  38. IN PUNICODE_STRING LogonDomainName
  39. );
  40. VOID
  41. KerbDereferenceSidCacheEntry(
  42. IN PKERB_SID_CACHE_ENTRY CacheEntry
  43. );
  44. VOID
  45. KerbCacheLogonSid(
  46. IN PUNICODE_STRING LogonUserName,
  47. IN PUNICODE_STRING LogonDomainName,
  48. IN PUNICODE_STRING LogonRealm,
  49. IN PSID UserSid
  50. );
  51. VOID
  52. KerbPutString(
  53. IN PUNICODE_STRING InputString,
  54. OUT PUNICODE_STRING OutputString,
  55. IN LONG_PTR Offset,
  56. IN OUT PBYTE * Where
  57. );
  58. NTSTATUS
  59. KerbGetMachineSid(
  60. OUT PSID * MachineSid
  61. );
  62. VOID
  63. KerbWriteMachineSid(
  64. IN OPTIONAL PSID MachineSid
  65. );
  66. #else // WIN32_CHICAGO
  67. //
  68. // define these to do nothing
  69. //
  70. #define KerbInitializeLogonSidCache() STATUS_SUCCESS
  71. #define KerbLocateLogonSidCacheEntry(x,y) NULL
  72. #define KerbDereferenceSidCacheEntry( x)
  73. #endif // WIN32_CHICAGO
  74. #endif // __SIDCACHE_H__