From 65a72fb527a2f8e0b5bef3aad8f46ebaa2a526fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Bi=C8=99oc?= Date: Sun, 27 Mar 2022 20:01:19 +0200 Subject: [PATCH] [USER32] Capture the security descriptor from the caller when creating a window station When creating a window station with CreateWindowStationW, the function ignores the security descriptor provided by the caller and instead it uses whatever descriptor the system can find. --- win32ss/user/user32/misc/winsta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32ss/user/user32/misc/winsta.c b/win32ss/user/user32/misc/winsta.c index 7308ad14619..111d7dec37a 100644 --- a/win32ss/user/user32/misc/winsta.c +++ b/win32ss/user/user32/misc/winsta.c @@ -104,7 +104,7 @@ CreateWindowStationW( lpwinsta ? &WindowStationName : NULL, OBJ_CASE_INSENSITIVE | OBJ_OPENIF, hWindowStationsDir, - NULL); + lpsa ? lpsa->lpSecurityDescriptor : NULL); /* Check if the handle should be inheritable */ if (lpsa && lpsa->bInheritHandle)