1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS system libraries 4 * FILE: include/reactos/subsys/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_ENUM_LOGON_SESSIONS, 25 LSASS_REQUEST_GET_LOGON_SESSION_DATA, 26 LSASS_REQUEST_POLICY_CHANGE_NOTIFY, 27 LSASS_REQUEST_MAXIMUM 28 } LSA_API_NUMBER, *PLSA_API_NUMBER; 29 30 31 typedef struct _LSA_CONNECTION_INFO 32 { 33 NTSTATUS Status; 34 LSA_OPERATIONAL_MODE OperationalMode; 35 ULONG Length; 36 CHAR LogonProcessNameBuffer[LSASS_MAX_LOGON_PROCESS_NAME_LENGTH + 1]; 37 BOOL CreateContext; 38 BOOL TrustedCaller; 39 } LSA_CONNECTION_INFO, *PLSA_CONNECTION_INFO; 40 41 42 typedef struct _LSA_LOGON_USER_MSG 43 { 44 union 45 { 46 struct 47 { 48 LSA_STRING OriginName; 49 SECURITY_LOGON_TYPE LogonType; 50 ULONG AuthenticationPackage; 51 PVOID AuthenticationInformation; 52 ULONG AuthenticationInformationLength; 53 PTOKEN_GROUPS LocalGroups; 54 ULONG LocalGroupsCount; 55 TOKEN_SOURCE SourceContext; 56 } Request; 57 58 struct 59 { 60 PVOID ProfileBuffer; 61 ULONG ProfileBufferLength; 62 LUID LogonId; 63 HANDLE Token; 64 QUOTA_LIMITS Quotas; 65 NTSTATUS SubStatus; 66 } Reply; 67 }; 68 } LSA_LOGON_USER_MSG, *PLSA_LOGON_USER_MSG; 69 70 71 typedef struct _LSA_CALL_AUTHENTICATION_PACKAGE_MSG 72 { 73 union 74 { 75 struct 76 { 77 ULONG AuthenticationPackage; 78 PVOID ProtocolSubmitBuffer; 79 ULONG SubmitBufferLength; 80 } Request; 81 struct 82 { 83 PVOID ProtocolReturnBuffer; 84 ULONG ReturnBufferLength; 85 NTSTATUS ProtocolStatus; 86 } Reply; 87 }; 88 } LSA_CALL_AUTHENTICATION_PACKAGE_MSG, *PLSA_CALL_AUTHENTICATION_PACKAGE_MSG; 89 90 91 typedef struct _LSA_DEREGISTER_LOGON_PROCESS_MSG 92 { 93 union 94 { 95 struct 96 { 97 ULONG Dummy; 98 } Request; 99 struct 100 { 101 ULONG Dummy; 102 } Reply; 103 }; 104 } LSA_DEREGISTER_LOGON_PROCESS_MSG, *PLSA_DEREGISTER_LOGON_PROCESS_MSG; 105 106 107 typedef struct _LSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG 108 { 109 union 110 { 111 struct 112 { 113 ULONG PackageNameLength; 114 CHAR PackageName[LSASS_MAX_PACKAGE_NAME_LENGTH + 1]; 115 } Request; 116 struct 117 { 118 ULONG Package; 119 } Reply; 120 }; 121 } LSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG, *PLSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG; 122 123 124 typedef struct _LSA_ENUM_LOGON_SESSIONS_MSG 125 { 126 union 127 { 128 struct 129 { 130 ULONG Dummy; 131 } Request; 132 struct 133 { 134 ULONG LogonSessionCount; 135 PVOID LogonSessionBuffer; 136 } Reply; 137 }; 138 } LSA_ENUM_LOGON_SESSIONS_MSG, *PLSA_ENUM_LOGON_SESSIONS_MSG; 139 140 141 typedef struct _LSA_GET_LOGON_SESSION_DATA_MSG 142 { 143 union 144 { 145 struct 146 { 147 LUID LogonId; 148 } Request; 149 struct 150 { 151 PVOID SessionDataBuffer; 152 } Reply; 153 }; 154 } LSA_GET_LOGON_SESSION_DATA_MSG, *PLSA_GET_LOGON_SESSION_DATA_MSG; 155 156 157 typedef struct _LSA_POLICY_CHANGE_NOTIFY_MSG 158 { 159 union 160 { 161 struct 162 { 163 POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass; 164 HANDLE NotificationEventHandle; 165 BOOLEAN Register; 166 } Request; 167 struct 168 { 169 ULONG Dummy; 170 } Reply; 171 }; 172 } LSA_POLICY_CHANGE_NOTIFY_MSG, *PLSA_POLICY_CHANGE_NOTIFY_MSG; 173 174 175 typedef struct _LSA_API_MSG 176 { 177 PORT_MESSAGE h; 178 union 179 { 180 LSA_CONNECTION_INFO ConnectInfo; 181 struct 182 { 183 LSA_API_NUMBER ApiNumber; 184 NTSTATUS Status; 185 union 186 { 187 LSA_LOGON_USER_MSG LogonUser; 188 LSA_CALL_AUTHENTICATION_PACKAGE_MSG CallAuthenticationPackage; 189 LSA_DEREGISTER_LOGON_PROCESS_MSG DeregisterLogonProcess; 190 LSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG LookupAuthenticationPackage; 191 LSA_ENUM_LOGON_SESSIONS_MSG EnumLogonSessions; 192 LSA_GET_LOGON_SESSION_DATA_MSG GetLogonSessionData; 193 LSA_POLICY_CHANGE_NOTIFY_MSG PolicyChangeNotify; 194 }; 195 }; 196 }; 197 } LSA_API_MSG, *PLSA_API_MSG; 198 199 #define LSA_PORT_DATA_SIZE(c) (sizeof(ULONG)+sizeof(NTSTATUS)+sizeof(c)) 200 #define LSA_PORT_MESSAGE_SIZE (sizeof(LSA_API_MSG)) 201 202 #endif /* __INCLUDE_LSASS_LSASS_H */ 203