From 19e16319b85ba2a50ed187435da50c1ef75d6a46 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 8 Oct 2015 14:19:43 +0200 Subject: [PATCH] ntdll: Initialize PEB SessionId to 1. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/ntdll/thread.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 9f49cd4f6a9..aaf7a713593 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -280,6 +280,12 @@ HANDLE thread_init(void) #endif #endif + /* + * Starting with Vista, the first user to log on has session id 1. + * Session id 0 is for processes that don't interact with the user (like services). + */ + peb->SessionId = 1; + /* allocate and initialize the initial TEB */ signal_alloc_thread( &teb ); -- 2.11.4.GIT