Fix CEF applications crash at start without --no-sandbox option.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53981 Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/user32/tests/winstation.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c index 9c27b5afd01..fc775546502 100644 --- a/dlls/user32/tests/winstation.c +++ b/dlls/user32/tests/winstation.c @@ -121,7 +121,9 @@ static void test_handles(void) char buffer[29], default_name[29] = ""; DWORD size; BOOL ret; + OBJECT_BASIC_INFORMATION info; TOKEN_STATISTICS token_stats; + NTSTATUS status;
/* win stations */
@@ -133,6 +135,12 @@ static void test_handles(void) ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() ); print_object( w1 );
+ status = NtQueryObject( w1, ObjectBasicInformation, &info, sizeof(info), NULL ); + ok( !status, "NtQueryObject failed, status %#lx\n", status ); + todo_wine + ok( info.GrantedAccess == (STANDARD_RIGHTS_REQUIRED | WINSTA_ALL_ACCESS), + "Got unexpected access %#lx\n", info.GrantedAccess ); + flags = 0; ok( GetHandleInformation( w1, &flags ), "GetHandleInformation failed\n" ); ok( !(flags & HANDLE_FLAG_PROTECT_FROM_CLOSE) || @@ -270,6 +278,12 @@ static void test_handles(void) ok( GetHandleInformation( d1, &flags ), "GetHandleInformation failed\n" ); ok( !(flags & HANDLE_FLAG_PROTECT_FROM_CLOSE), "handle %p PROTECT_FROM_CLOSE set\n", d1 );
+ status = NtQueryObject( d1, ObjectBasicInformation, &info, sizeof(info), NULL ); + ok( !status, "NtQueryObject failed, status %#lx\n", status ); + todo_wine + ok( info.GrantedAccess == (STANDARD_RIGHTS_REQUIRED | DESKTOP_ALL_ACCESS), + "Got unexpected access %#lx\n", info.GrantedAccess ); + SetLastError( 0xdeadbeef ); ok( !CloseDesktop(d1), "closing thread desktop succeeded\n" ); ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */
From: Dmitry Timoshkov dmitry@baikal.ru
Fix CEF applications crash at start without --no-sandbox option.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53981 Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/user32/tests/winstation.c | 1 - dlls/win32u/winstation.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c index fc775546502..40105dd0f33 100644 --- a/dlls/user32/tests/winstation.c +++ b/dlls/user32/tests/winstation.c @@ -137,7 +137,6 @@ static void test_handles(void)
status = NtQueryObject( w1, ObjectBasicInformation, &info, sizeof(info), NULL ); ok( !status, "NtQueryObject failed, status %#lx\n", status ); - todo_wine ok( info.GrantedAccess == (STANDARD_RIGHTS_REQUIRED | WINSTA_ALL_ACCESS), "Got unexpected access %#lx\n", info.GrantedAccess );
diff --git a/dlls/win32u/winstation.c b/dlls/win32u/winstation.c index 145e12a8e1f..a6b35090223 100644 --- a/dlls/win32u/winstation.c +++ b/dlls/win32u/winstation.c @@ -604,7 +604,7 @@ void winstation_init(void) InitializeObjectAttributes( &attr, &str, OBJ_CASE_INSENSITIVE | OBJ_OPENIF, dir, NULL );
- handle = NtUserCreateWindowStation( &attr, WINSTA_ALL_ACCESS, 0, 0, 0, 0, 0 ); + handle = NtUserCreateWindowStation( &attr, STANDARD_RIGHTS_REQUIRED | WINSTA_ALL_ACCESS, 0, 0, 0, 0, 0 ); if (handle) { NtUserSetProcessWindowStation( handle );
From: Dmitry Timoshkov dmitry@baikal.ru
Fix CEF applications crash at start without --no-sandbox option.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53981 Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/user32/tests/winstation.c | 1 - dlls/win32u/winstation.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c index 40105dd0f33..e33a3252494 100644 --- a/dlls/user32/tests/winstation.c +++ b/dlls/user32/tests/winstation.c @@ -279,7 +279,6 @@ static void test_handles(void)
status = NtQueryObject( d1, ObjectBasicInformation, &info, sizeof(info), NULL ); ok( !status, "NtQueryObject failed, status %#lx\n", status ); - todo_wine ok( info.GrantedAccess == (STANDARD_RIGHTS_REQUIRED | DESKTOP_ALL_ACCESS), "Got unexpected access %#lx\n", info.GrantedAccess );
diff --git a/dlls/win32u/winstation.c b/dlls/win32u/winstation.c index a6b35090223..d7300774a56 100644 --- a/dlls/win32u/winstation.c +++ b/dlls/win32u/winstation.c @@ -628,7 +628,7 @@ void winstation_init(void) InitializeObjectAttributes( &attr, &str, OBJ_CASE_INSENSITIVE | OBJ_OPENIF, dir, NULL );
- handle = NtUserCreateDesktopEx( &attr, NULL, NULL, 0, DESKTOP_ALL_ACCESS, 0 ); + handle = NtUserCreateDesktopEx( &attr, NULL, NULL, 0, STANDARD_RIGHTS_REQUIRED | DESKTOP_ALL_ACCESS, 0 ); if (handle) NtUserSetThreadDesktop( handle ); } NtClose( dir );
This merge request was approved by Zhiyi Zhang.