https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cbff9a30461c71e408468…
commit cbff9a30461c71e408468a54353775266ebb1314
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Tue Sep 11 08:15:37 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Tue Sep 11 08:30:31 2018 +0200
[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 8610bbfc91..64d3fef8b5 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 e56ba639e7..d914bebefc 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();