Windows NT 4.0 source code leak
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.

217 lines
5.9 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. aup.h
  5. Abstract:
  6. Local Security Authority definitions that are related to AUTHENTICATION
  7. services and are shared between the LSA server and LSA client stubs
  8. Author:
  9. Jim Kelly (JimK) 20-Feb-1991
  10. Revision History:
  11. --*/
  12. #ifndef _AUP_
  13. #define _AUP_
  14. #define LSAP_MAX_LOGON_PROC_NAME_LENGTH 127
  15. #define LSAP_MAX_PACKAGE_NAME_LENGTH 127
  16. //
  17. // Used for connecting to the LSA authentiction port.
  18. //
  19. typedef struct _LSAP_AU_REGISTER_CONNECT_INFO {
  20. NTSTATUS CompletionStatus;
  21. LSA_OPERATIONAL_MODE SecurityMode;
  22. ULONG LogonProcessNameLength;
  23. CHAR LogonProcessName[LSAP_MAX_PACKAGE_NAME_LENGTH+1];
  24. } LSAP_AU_REGISTER_CONNECT_INFO, *PLSAP_AU_REGISTER_CONNECT_INFO;
  25. //
  26. // Message formats used by clients of the local security authority.
  27. // Note that:
  28. //
  29. // LsaFreeReturnBuffer() does not result in a call to the server.
  30. //
  31. // LsaRegisterLogonProcess() is handled completely by the
  32. // LPC port connection, and requires no API number.
  33. //
  34. // DeRegister Logon Process doesn't have a call-specific structure.
  35. //
  36. typedef enum _LSAP_AU_API_NUMBER {
  37. LsapAuLookupPackageApi,
  38. LsapAuLogonUserApi,
  39. LsapAuCallPackageApi,
  40. LsapAuDeregisterLogonProcessApi,
  41. LsapAuMaxApiNumber
  42. } LSAP_AU_API_NUMBER, *PLSAP_AU_API_NUMBER;
  43. //
  44. // Each API results in a data structure containing the parameters
  45. // of that API being transmitted to the LSA server. This data structure
  46. // (LSAP_API_MESSAGE) has a common header and a body which is dependent
  47. // upon the type of call being made. The following data structures are
  48. // the call-specific body formats.
  49. //
  50. typedef struct _LSAP_LOOKUP_PACKAGE_ARGS {
  51. ULONG AuthenticationPackage; // OUT parameter
  52. ULONG PackageNameLength;
  53. CHAR PackageName[LSAP_MAX_PACKAGE_NAME_LENGTH+1];
  54. } LSAP_LOOKUP_PACKAGE_ARGS, *PLSAP_LOOKUP_PACKAGE_ARGS;
  55. typedef struct _LSAP_LOGON_USER_ARGS {
  56. STRING OriginName;
  57. SECURITY_LOGON_TYPE LogonType;
  58. ULONG AuthenticationPackage;
  59. PVOID AuthenticationInformation;
  60. ULONG AuthenticationInformationLength;
  61. ULONG LocalGroupsCount;
  62. PTOKEN_GROUPS LocalGroups;
  63. TOKEN_SOURCE SourceContext;
  64. NTSTATUS SubStatus; // OUT parameter
  65. PVOID ProfileBuffer; // OUT parameter
  66. ULONG ProfileBufferLength; // OUT parameter
  67. ULONG DummySpacer; // Spacer to force LUID to 8 byte alignment
  68. LUID LogonId; // OUT parameter
  69. HANDLE Token; // OUT parameter
  70. QUOTA_LIMITS Quotas; // OUT parameter
  71. } LSAP_LOGON_USER_ARGS, *PLSAP_LOGON_USER_ARGS;
  72. typedef struct _LSAP_CALL_PACKAGE_ARGS {
  73. ULONG AuthenticationPackage;
  74. PVOID ProtocolSubmitBuffer;
  75. ULONG SubmitBufferLength;
  76. NTSTATUS ProtocolStatus; // OUT parameter
  77. PVOID ProtocolReturnBuffer; // OUT parameter
  78. ULONG ReturnBufferLength; // OUT parameter
  79. } LSAP_CALL_PACKAGE_ARGS, *PLSAP_CALL_PACKAGE_ARGS;
  80. //
  81. // This is the message that gets sent for every LSA LPC call.
  82. //
  83. typedef struct _LSAP_AU_API_MESSAGE {
  84. PORT_MESSAGE PortMessage;
  85. union {
  86. LSAP_AU_REGISTER_CONNECT_INFO ConnectionRequest;
  87. struct {
  88. LSAP_AU_API_NUMBER ApiNumber;
  89. NTSTATUS ReturnedStatus;
  90. union {
  91. LSAP_LOOKUP_PACKAGE_ARGS LookupPackage;
  92. LSAP_LOGON_USER_ARGS LogonUser;
  93. LSAP_CALL_PACKAGE_ARGS CallPackage;
  94. } Arguments;
  95. };
  96. };
  97. } LSAP_AU_API_MESSAGE, *PLSAP_AU_API_MESSAGE;
  98. /////////////////////////////////////////////////////////////////////////
  99. // //
  100. // Private Interface definitions available for use by Microsoft //
  101. // authentication packages //
  102. // //
  103. /////////////////////////////////////////////////////////////////////////
  104. typedef NTSTATUS
  105. (*PLSAP_GET_OPERATIONAL_MODE) (
  106. OUT PLSA_OPERATIONAL_MODE OperationalMode
  107. );
  108. typedef NTSTATUS
  109. (*PLSAP_GET_PRIMARY_DOMAIN) (
  110. OUT PBOOLEAN PrimaryDomainDefined,
  111. OUT PSTRING *PrimaryDomain
  112. );
  113. typedef NTSTATUS
  114. (*PLSAP_IMPERSONATE_CLIENT) (
  115. IN PLSA_CLIENT_REQUEST ClientRequest
  116. );
  117. //
  118. // Dispatch table of private LSA services which are available to
  119. // Microsoft authentication packages.
  120. //
  121. typedef struct _LSAP_PRIVATE_LSA_SERVICES {
  122. PLSAP_GET_OPERATIONAL_MODE GetOperationalMode;
  123. PLSAP_GET_PRIMARY_DOMAIN GetPrimaryDomain;
  124. PLSAP_IMPERSONATE_CLIENT ImpersonateClient;
  125. } LSAP_PRIVATE_LSA_SERVICES, *PLSAP_PRIVATE_LSA_SERVICES;
  126. ////////////////////////////////////////////////////////////////////////////
  127. // //
  128. // Interface definitions of services provided by Microsoft //
  129. // authentication packages that aren't part of the standard interface //
  130. // definition. //
  131. // //
  132. ////////////////////////////////////////////////////////////////////////////
  133. //
  134. // Routine names
  135. //
  136. // The routines provided by the DLL must be assigned the following names
  137. // so that their addresses can be retrieved when the DLL is loaded.
  138. //
  139. #define LSAP_AP_NAME_MS_INITIALIZE "LsaApMsInitialize\0"
  140. //
  141. // Routine templates
  142. //
  143. typedef VOID
  144. (*PLSA_AP_MS_INITIALIZE) (
  145. IN PLSAP_PRIVATE_LSA_SERVICES PrivateLsaApi
  146. );
  147. ///////////////////////////////////////////////////////////////////////////////
  148. // //
  149. // Internal (private) client-side routine definitions //
  150. // //
  151. ///////////////////////////////////////////////////////////////////////////////
  152. #endif // _AUP_