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