96b0497aa2b50b8a5091da05ff6bd7c3af656757
[reactos.git] / reactos / include / reactos / subsys / lsass / lsass.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: include/lsass/lsass.h
5 * PURPOSE: LSASS API declarations
6 * UPDATE HISTORY:
7 * Created 05/08/00
8 */
9
10 #ifndef __INCLUDE_LSASS_LSASS_H
11 #define __INCLUDE_LSASS_LSASS_H
12
13 #include <ntsecapi.h>
14
15 #define LSASS_MAX_LOGON_PROCESS_NAME_LENGTH 127
16 #define LSASS_MAX_PACKAGE_NAME_LENGTH 127
17
18 typedef enum _LSA_API_NUMBER
19 {
20 LSASS_REQUEST_CALL_AUTHENTICATION_PACKAGE,
21 LSASS_REQUEST_DEREGISTER_LOGON_PROCESS,
22 LSASS_REQUEST_LOGON_USER,
23 LSASS_REQUEST_LOOKUP_AUTHENTICATION_PACKAGE,
24 LSASS_REQUEST_MAXIMUM
25 } LSA_API_NUMBER, *PLSA_API_NUMBER;
26
27
28 typedef struct _LSA_CONNECTION_INFO
29 {
30 NTSTATUS Status;
31 LSA_OPERATIONAL_MODE OperationalMode;
32 ULONG Length;
33 CHAR LogonProcessNameBuffer[LSASS_MAX_LOGON_PROCESS_NAME_LENGTH + 1];
34 } LSA_CONNECTION_INFO, *PLSA_CONNECTION_INFO;
35
36
37 typedef struct _LSA_LOGON_USER_MSG
38 {
39 union
40 {
41 struct
42 {
43 LSA_STRING OriginName;
44 SECURITY_LOGON_TYPE LogonType;
45 ULONG AuthenticationPackage;
46 PVOID AuthenticationInformation;
47 ULONG AuthenticationInformationLength;
48 PTOKEN_GROUPS LocalGroups;
49 ULONG LocalGroupsCount;
50 TOKEN_SOURCE SourceContext;
51 } Request;
52
53 struct
54 {
55 PVOID ProfileBuffer;
56 ULONG ProfileBufferLength;
57 LUID LogonId;
58 HANDLE Token;
59 QUOTA_LIMITS Quotas;
60 NTSTATUS SubStatus;
61 } Reply;
62 };
63 } LSA_LOGON_USER_MSG, *PLSA_LOGON_USER_MSG;
64
65
66 typedef struct _LSA_CALL_AUTHENTICATION_PACKAGE_MSG
67 {
68 union
69 {
70 struct
71 {
72 #if 0
73 ULONG AuthenticationPackage;
74 ULONG InBufferLength;
75 UCHAR InBuffer[0];
76 #endif
77 ULONG AuthenticationPackage;
78 PVOID ProtocolSubmitBuffer;
79 ULONG SubmitBufferLength;
80 } Request;
81 struct
82 {
83 #if 0
84 ULONG OutBufferLength;
85 UCHAR OutBuffer[0];
86 #endif
87 PVOID ProtocolReturnBuffer;
88 ULONG ReturnBufferLength;
89 NTSTATUS ProtocolStatus;
90 } Reply;
91 };
92 } LSA_CALL_AUTHENTICATION_PACKAGE_MSG, *PLSA_CALL_AUTHENTICATION_PACKAGE_MSG;
93
94
95 typedef struct _LSA_DEREGISTER_LOGON_PROCESS_MSG
96 {
97 union
98 {
99 struct
100 {
101 ULONG Dummy;
102 } Request;
103 struct
104 {
105 ULONG Dummy;
106 } Reply;
107 };
108 } LSA_DEREGISTER_LOGON_PROCESS_MSG, *PLSA_DEREGISTER_LOGON_PROCESS_MSG;
109
110
111 typedef struct _LSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG
112 {
113 union
114 {
115 struct
116 {
117 ULONG PackageNameLength;
118 CHAR PackageName[LSASS_MAX_PACKAGE_NAME_LENGTH + 1];
119 } Request;
120 struct
121 {
122 ULONG Package;
123 } Reply;
124 };
125 } LSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG, *PLSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG;
126
127
128 typedef struct _LSA_API_MSG
129 {
130 PORT_MESSAGE h;
131 union
132 {
133 LSA_CONNECTION_INFO ConnectInfo;
134 struct
135 {
136 LSA_API_NUMBER ApiNumber;
137 NTSTATUS Status;
138 union
139 {
140 LSA_LOGON_USER_MSG LogonUser;
141 LSA_CALL_AUTHENTICATION_PACKAGE_MSG CallAuthenticationPackage;
142 LSA_DEREGISTER_LOGON_PROCESS_MSG DeregisterLogonProcess;
143 LSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG LookupAuthenticationPackage;
144 };
145 };
146 };
147 } LSA_API_MSG, *PLSA_API_MSG;
148
149 #define LSA_PORT_DATA_SIZE(c) (sizeof(ULONG)+sizeof(NTSTATUS)+sizeof(c))
150 #define LSA_PORT_MESSAGE_SIZE (sizeof(LSA_API_MSG))
151
152 #endif /* __INCLUDE_LSASS_LSASS_H */