From cbff9a30461c71e408468a54353775266ebb1314 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Tue, 11 Sep 2018 08:15:37 +0200 Subject: [PATCH] [WINLOGON] On logoff, also disconnect from any remote location This avoids keeping connections open and reopening them as soon as the user reopens their session. This fixes network shared being duplicated each time session is reopened. CORE-15012 --- base/system/winlogon/CMakeLists.txt | 2 +- base/system/winlogon/sas.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/base/system/winlogon/CMakeLists.txt b/base/system/winlogon/CMakeLists.txt index 8610bbfc913..64d3fef8b57 100644 --- a/base/system/winlogon/CMakeLists.txt +++ b/base/system/winlogon/CMakeLists.txt @@ -22,6 +22,6 @@ add_rc_deps(winlogon.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/winlogon.ico) add_executable(winlogon ${SOURCE} winlogon.rc) target_link_libraries(winlogon wine) set_module_type(winlogon win32gui) -add_importlibs(winlogon user32 advapi32 userenv secur32 rpcrt4 msvcrt kernel32 ntdll) +add_importlibs(winlogon user32 advapi32 userenv secur32 rpcrt4 mpr msvcrt kernel32 ntdll) add_pch(winlogon winlogon.h SOURCE) add_cd_file(TARGET winlogon DESTINATION reactos/system32 FOR all) diff --git a/base/system/winlogon/sas.c b/base/system/winlogon/sas.c index e56ba639e73..d914bebefc0 100644 --- a/base/system/winlogon/sas.c +++ b/base/system/winlogon/sas.c @@ -657,6 +657,9 @@ LogoffShutdownThread( ret = 0; } + /* Cancel all the user connections */ + WNetClearConnections(0); + if (LSData->Session->UserToken) RevertToSelf();