[WINLOGON] On logoff, also disconnect from any remote location
authorPierre Schweitzer <pierre@reactos.org>
Tue, 11 Sep 2018 06:15:37 +0000 (08:15 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Tue, 11 Sep 2018 06:30:31 +0000 (08:30 +0200)
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
base/system/winlogon/sas.c

index 8610bbf..64d3fef 100644 (file)
@@ -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_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)
 add_pch(winlogon winlogon.h SOURCE)
 add_cd_file(TARGET winlogon DESTINATION reactos/system32 FOR all)
index e56ba63..d914beb 100644 (file)
@@ -657,6 +657,9 @@ LogoffShutdownThread(
         ret = 0;
     }
 
         ret = 0;
     }
 
+    /* Cancel all the user connections */
+    WNetClearConnections(0);
+
     if (LSData->Session->UserToken)
         RevertToSelf();
 
     if (LSData->Session->UserToken)
         RevertToSelf();