57 return CurrentSession;
59 SessionEntry = SessionEntry->
Flink;
92 TRACE(
"UserName %wZ\n", UserName);
95 UserName->MaximumLength);
114 TRACE(
"LogonDomain %wZ\n", LogonDomain);
115 if (LogonDomain->Length)
119 LogonDomain->MaximumLength);
180 TRACE(
"LsapCreateLogonSession(<0x%lx,0x%lx>)\n",
213 TRACE(
"LsapDeleteLogonSession(0x%08lx%08lx)\n",
311 TRACE(
"LsapEnumLogonSessions(%p)\n", RequestMsg);
317 if (SessionList ==
NULL)
331 SessionEntry = SessionEntry->
Flink;
344 &RequestMsg->h.ClientId);
347 TRACE(
"NtOpenProcess() failed (Status %lx)\n",
Status);
362 TRACE(
"NtAllocateVirtualMemory() failed (Status %lx)\n",
Status);
366 TRACE(
"MemSize: %lu\n", MemSize);
367 TRACE(
"ClientBaseAddress: %p\n", ClientBaseAddress);
376 TRACE(
"NtWriteVirtualMemory() failed (Status %lx)\n",
Status);
380 RequestMsg->EnumLogonSessions.Reply.LogonSessionCount =
SessionCount;
381 RequestMsg->EnumLogonSessions.Reply.LogonSessionBuffer = ClientBaseAddress;
387 if (SessionList !=
NULL)
407 TRACE(
"LsapGetLogonSessionData(%p)\n", RequestMsg);
409 TRACE(
"LogonId: %lx\n", RequestMsg->GetLogonSessionData.Request.LogonId.LowPart);
433 if (LocalSessionData ==
NULL)
437 TRACE(
"LocalSessionData: %p Ptr: %p\n", LocalSessionData,
Ptr);
443 &RequestMsg->GetLogonSessionData.Request.LogonId);
535 &RequestMsg->h.ClientId);
538 TRACE(
"NtOpenProcess() failed (Status %lx)\n",
Status);
551 TRACE(
"NtAllocateVirtualMemory() failed (Status %lx)\n",
Status);
555 TRACE(
"MemSize: %lu\n", MemSize);
556 TRACE(
"ClientBaseAddress: %p\n", ClientBaseAddress);
565 TRACE(
"NtWriteVirtualMemory() failed (Status %lx)\n",
Status);
569 RequestMsg->GetLogonSessionData.Reply.SessionDataBuffer = ClientBaseAddress;
575 if (LocalSessionData !=
NULL)
576 RtlFreeHeap(RtlGetProcessHeap(), 0, LocalSessionData);
VOID LsapTerminateLogon(_In_ PLUID LogonId)
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
ULONG AuthenticationPackage
NTSTATUS LsapRmDeleteLogonSession(PLUID LogonId)
NTSTATUS LsapRmCreateLogonSession(PLUID LogonId)
NTSTATUS NTAPI LsapAddCredential(_In_ PLUID LogonId, _In_ ULONG AuthenticationPackage, _In_ PLSA_STRING PrimaryKeyValue, _In_ PLSA_STRING Credential)
NTSTATUS NTAPI LsapGetCredentials(_In_ PLUID LogonId, _In_ ULONG AuthenticationPackage, _Inout_ PULONG QueryContext, _In_ BOOLEAN RetrieveAllCredentials, _Inout_ PLSA_STRING PrimaryKeyValue, _Out_ PULONG PrimaryKeyLength, _Out_ PLSA_STRING Credentials)
NTSTATUS NTAPI LsapCreateLogonSession(IN PLUID LogonId)
LIST_ENTRY SessionListHead
struct _LSAP_LOGON_SESSION LSAP_LOGON_SESSION
NTSTATUS NTAPI LsapDeleteLogonSession(IN PLUID LogonId)
NTSTATUS NTAPI LsapDeleteCredential(_In_ PLUID LogonId, _In_ ULONG AuthenticationPackage, _In_ PLSA_STRING PrimaryKeyValue)
NTSTATUS LsapSetLogonSessionData(_In_ PLUID LogonId, _In_ ULONG LogonType, _In_ PUNICODE_STRING UserName, _In_ PUNICODE_STRING LogonDomain, _In_ PSID Sid)
NTSTATUS LsapEnumLogonSessions(IN OUT PLSA_API_MSG RequestMsg)
NTSTATUS LsapGetLogonSessionData(IN OUT PLSA_API_MSG RequestMsg)
struct _LSAP_LOGON_SESSION * PLSAP_LOGON_SESSION
VOID LsapInitLogonSessions(VOID)
static PLSAP_LOGON_SESSION LsapGetLogonSession(IN PLUID LogonId)
#define RemoveEntryList(Entry)
#define InsertHeadList(ListHead, Entry)
#define InitializeListHead(ListHead)
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define PROCESS_VM_OPERATION
NTSYSAPI void WINAPI RtlCopyLuid(PLUID, const LUID *)
#define InitializeObjectAttributes(p, n, a, r, s)
_In_ HANDLE ProcessHandle
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
NTSYSAPI NTSTATUS NTAPI RtlValidateUnicodeString(_In_ ULONG Flags, _In_ PCUNICODE_STRING String)
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE LogonType
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID LogonId
NTSTATUS NTAPI NtWriteVirtualMemory(IN HANDLE ProcessHandle, IN PVOID BaseAddress, IN PVOID Buffer, IN SIZE_T NumberOfBytesToWrite, OUT PSIZE_T NumberOfBytesWritten OPTIONAL)
NTSTATUS NTAPI NtAllocateVirtualMemory(IN HANDLE ProcessHandle, IN OUT PVOID *UBaseAddress, IN ULONG_PTR ZeroBits, IN OUT PSIZE_T URegionSize, IN ULONG AllocationType, IN ULONG Protect)
NTSTATUS NTAPI NtOpenProcess(OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN PCLIENT_ID ClientId)
struct _SECURITY_LOGON_SESSION_DATA SECURITY_LOGON_SESSION_DATA
#define STATUS_LOGON_SESSION_COLLISION
#define STATUS_NO_SUCH_LOGON_SESSION
base of all file and directory entries
struct _LIST_ENTRY * Flink
UNICODE_STRING LogonServer
UNICODE_STRING DnsDomainName
UNICODE_STRING LogonDomain
UNICODE_STRING AuthenticationPackage
LSA_UNICODE_STRING DnsDomainName
LSA_UNICODE_STRING LogonDomain
LSA_UNICODE_STRING LogonServer
LSA_UNICODE_STRING UserName
LSA_UNICODE_STRING AuthenticationPackage
#define RtlCopyMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_INSUFFICIENT_RESOURCES
#define RtlEqualLuid(Luid1, Luid2)