winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2010
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
852 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Pass a wined3d_state structure to device_preload_texture().
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: 5097623dcfbddcce049be54957bf66bae7547803 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5097623dcfbddcce049be5495…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Sep 30 11:44:27 2010 +0200 wined3d: Pass a wined3d_state structure to device_preload_texture(). --- dlls/wined3d/device.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index cf50ce8..ea4f69e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -453,20 +453,19 @@ void device_update_stream_info(IWineD3DDeviceImpl *device, const struct wined3d_ } } -static void device_preload_texture(IWineD3DStateBlockImpl *stateblock, unsigned int idx) +static void device_preload_texture(const struct wined3d_state *state, unsigned int idx) { IWineD3DBaseTextureImpl *texture; enum WINED3DSRGB srgb; - if (!(texture = stateblock->state.textures[idx])) return; - srgb = stateblock->state.sampler_states[idx][WINED3DSAMP_SRGBTEXTURE] ? SRGB_SRGB : SRGB_RGB; + if (!(texture = state->textures[idx])) return; + srgb = state->sampler_states[idx][WINED3DSAMP_SRGBTEXTURE] ? SRGB_SRGB : SRGB_RGB; texture->baseTexture.internal_preload((IWineD3DBaseTexture *)texture, srgb); } void device_preload_textures(IWineD3DDeviceImpl *device) { - IWineD3DStateBlockImpl *stateblock = device->stateBlock; - const struct wined3d_state *state = &stateblock->state; + const struct wined3d_state *state = &device->stateBlock->state; unsigned int i; if (use_vs(state)) @@ -474,7 +473,7 @@ void device_preload_textures(IWineD3DDeviceImpl *device) for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) { if (state->vertex_shader->baseShader.reg_maps.sampler_type[i]) - device_preload_texture(stateblock, MAX_FRAGMENT_SAMPLERS + i); + device_preload_texture(state, MAX_FRAGMENT_SAMPLERS + i); } } @@ -483,7 +482,7 @@ void device_preload_textures(IWineD3DDeviceImpl *device) for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) { if (state->pixel_shader->baseShader.reg_maps.sampler_type[i]) - device_preload_texture(stateblock, i); + device_preload_texture(state, i); } } else @@ -493,7 +492,7 @@ void device_preload_textures(IWineD3DDeviceImpl *device) for (i = 0; ffu_map; ffu_map >>= 1, ++i) { if (ffu_map & 1) - device_preload_texture(stateblock, i); + device_preload_texture(state, i); } } }
1
0
0
0
Andrew Nguyen : msvcrt: Initialize environ on DLL load.
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: 285e6d249fded2a306a251550652c650f7bf81ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=285e6d249fded2a306a251550…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Thu Sep 30 01:24:13 2010 -0500 msvcrt: Initialize environ on DLL load. --- dlls/msvcrt/data.c | 15 +++-- dlls/msvcrt/environ.c | 12 +--- dlls/msvcrt/tests/environ.c | 131 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 142 insertions(+), 16 deletions(-) diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c index 54dda1c..068b29f 100644 --- a/dlls/msvcrt/data.c +++ b/dlls/msvcrt/data.c @@ -204,8 +204,6 @@ MSVCRT_wchar_t*** CDECL __p___wargv(void) { return &MSVCRT___wargv; } */ char*** CDECL __p__environ(void) { - if (!MSVCRT__environ) - MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(NULL); return &MSVCRT__environ; } @@ -214,8 +212,6 @@ char*** CDECL __p__environ(void) */ MSVCRT_wchar_t*** CDECL __p__wenviron(void) { - if (!MSVCRT__wenviron) - MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(NULL); return &MSVCRT__wenviron; } @@ -311,9 +307,10 @@ void msvcrt_init_args(void) MSVCRT___setlc_active = 0; MSVCRT___unguarded_readlc_active = 0; MSVCRT__fmode = MSVCRT__O_TEXT; - - MSVCRT___initenv= msvcrt_SnapshotOfEnvironmentA(NULL); - MSVCRT___winitenv= msvcrt_SnapshotOfEnvironmentW(NULL); + + MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(NULL); + MSVCRT___initenv = msvcrt_SnapshotOfEnvironmentA(NULL); + MSVCRT___winitenv = msvcrt_SnapshotOfEnvironmentW(NULL); MSVCRT__pgmptr = HeapAlloc(GetProcessHeap(), 0, MAX_PATH); if (MSVCRT__pgmptr) @@ -368,6 +365,10 @@ void CDECL __wgetmainargs(int *argc, MSVCRT_wchar_t** *wargv, MSVCRT_wchar_t** * int expand_wildcards, int *new_mode) { TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenvp, expand_wildcards, new_mode); + + /* Initialize the _wenviron array if it's not already created. */ + if (!MSVCRT__wenviron) + MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(NULL); *argc = MSVCRT___argc; *wargv = MSVCRT___wargv; *wenvp = MSVCRT___winitenv; diff --git a/dlls/msvcrt/environ.c b/dlls/msvcrt/environ.c index a60f116..6ceeebb 100644 --- a/dlls/msvcrt/environ.c +++ b/dlls/msvcrt/environ.c @@ -104,9 +104,8 @@ int CDECL _putenv(const char *str) /* _putenv returns success on deletion of nonexistent variable, unlike [Rtl]SetEnvironmentVariable */ if ((ret == -1) && (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) ret = 0; - /* Update the __p__environ array only when already initialized */ - if (MSVCRT__environ) - MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(MSVCRT__environ); + MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(MSVCRT__environ); + /* Update the __p__wenviron array only when already initialized */ if (MSVCRT__wenviron) MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(MSVCRT__wenviron); @@ -150,11 +149,8 @@ int CDECL _wputenv(const MSVCRT_wchar_t *str) /* _putenv returns success on deletion of nonexistent variable, unlike [Rtl]SetEnvironmentVariable */ if ((ret == -1) && (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) ret = 0; - /* Update the __p__environ array only when already initialized */ - if (MSVCRT__environ) - MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(MSVCRT__environ); - if (MSVCRT__wenviron) - MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(MSVCRT__wenviron); + MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(MSVCRT__environ); + MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(MSVCRT__wenviron); finish: HeapFree(GetProcessHeap(), 0, name); diff --git a/dlls/msvcrt/tests/environ.c b/dlls/msvcrt/tests/environ.c index 336238c..3169503 100644 --- a/dlls/msvcrt/tests/environ.c +++ b/dlls/msvcrt/tests/environ.c @@ -42,6 +42,20 @@ static const char *a_very_long_env_string = "/usr/lib/mingw32/3.4.2/;" "/usr/lib/"; +void __cdecl __getmainargs(int *, char ***, char ***, int, int *); +void __cdecl __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, int *); + +static char ***p_environ; +static WCHAR ***p_wenviron; + +static void init(void) +{ + HMODULE hmod = GetModuleHandleA("msvcrt.dll"); + + p_environ = (void *)GetProcAddress(hmod, "_environ"); + p_wenviron = (void *)GetProcAddress(hmod, "_wenviron"); +} + static void test_system(void) { int ret = system(NULL); @@ -51,7 +65,112 @@ static void test_system(void) ok(ret == 0, "Expected system to return 0, got %d\n", ret); } -START_TEST(environ) +static void test__environ(void) +{ + int argc; + char **argv, **envp = NULL; + int i, mode = 0; + + ok( p_environ != NULL, "Expected the pointer to _environ to be non-NULL\n" ); + if (p_environ) + ok( *p_environ != NULL, "Expected _environ to be initialized on startup\n" ); + + if (!p_environ || !*p_environ) + { + skip( "_environ pointers are not valid\n" ); + return; + } + + /* Note that msvcrt from Windows versions older than Vista + * expects the mode pointer parameter to be valid.*/ + __getmainargs(&argc, &argv, &envp, 0, &mode); + + ok( envp != NULL, "Expected initial environment block pointer to be non-NULL\n" ); + if (!envp) + { + skip( "Initial environment block pointer is not valid\n" ); + return; + } + + for (i = 0; ; i++) + { + if ((*p_environ)[i]) + { + ok( envp[i] != NULL, "Expected environment block pointer element to be non-NULL\n" ); + ok( !strcmp((*p_environ)[i], envp[i]), + "Expected _environ and environment block pointer strings (%s vs. %s) to match\n", + (*p_environ)[i], envp[i] ); + } + else + { + ok( !envp[i], "Expected environment block pointer element to be NULL, got %p\n", envp[i] ); + break; + } + } +} + +static void test__wenviron(void) +{ + int argc; + char **argv, **envp = NULL; + WCHAR **wargv, **wenvp = NULL; + int i, mode = 0; + + ok( p_wenviron != NULL, "Expected the pointer to _wenviron to be non-NULL\n" ); + if (p_wenviron) + ok( *p_wenviron == NULL, "Expected _wenviron to be NULL, got %p\n", *p_wenviron ); + else + { + skip( "Pointer to _wenviron is not valid\n" ); + return; + } + + /* __getmainargs doesn't initialize _wenviron. */ + __getmainargs(&argc, &argv, &envp, 0, &mode); + + ok( *p_wenviron == NULL, "Expected _wenviron to be NULL, got %p\n", *p_wenviron); + ok( envp != NULL, "Expected initial environment block pointer to be non-NULL\n" ); + if (!envp) + { + skip( "Initial environment block pointer is not valid\n" ); + return; + } + + /* Neither does calling the non-Unicode environment manipulation functions. */ + ok( _putenv("cat=dog") == 0, "failed setting cat=dog\n" ); + ok( *p_wenviron == NULL, "Expected _wenviron to be NULL, got %p\n", *p_wenviron); + ok( _putenv("cat=") == 0, "failed deleting cat\n" ); + + /* _wenviron isn't initialized until __wgetmainargs is called or + * one of the Unicode environment manipulation functions is called. */ + __wgetmainargs(&argc, &wargv, &wenvp, 0, &mode); + + ok( *p_wenviron != NULL, "Expected _wenviron to be non-NULL\n" ); + ok( wenvp != NULL, "Expected initial environment block pointer to be non-NULL\n" ); + if (!wenvp) + { + skip( "Initial environment block pointer is not valid\n" ); + return; + } + + for (i = 0; ; i++) + { + if ((*p_wenviron)[i]) + { + ok( wenvp[i] != NULL, "Expected environment block pointer element to be non-NULL\n" ); + ok( !winetest_strcmpW((*p_wenviron)[i], wenvp[i]), + "Expected _wenviron and environment block pointer strings (%s vs. %s) to match\n", + wine_dbgstr_w((*p_wenviron)[i]), wine_dbgstr_w(wenvp[i]) ); + } + else + { + ok( !wenvp[i], "Expected environment block pointer element to be NULL, got %p\n", wenvp[i] ); + break; + } + } +} + +static void test_environment_manipulation(void) { ok( _putenv("cat=") == 0, "_putenv failed on deletion of nonexistent environment variable\n" ); ok( _putenv("cat=dog") == 0, "failed setting cat=dog\n" ); @@ -63,6 +182,16 @@ START_TEST(environ) ok( _putenv(a_very_long_env_string) == 0, "_putenv failed for long environment string\n"); ok( getenv("nonexistent") == NULL, "getenv should fail with nonexistent var name\n" ); +} + +START_TEST(environ) +{ + init(); + /* The environ tests should always be run first, as they assume + * that the process has not manipulated the environment. */ + test__environ(); + test__wenviron(); + test_environment_manipulation(); test_system(); }
1
0
0
0
Alexandre Julliard : ntdll: Add a workaround for Ubuntu' s stupid ptrace breakage.
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: 9227eb2c9d6f0cecbabcb54cc25b5691f544b0f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9227eb2c9d6f0cecbabcb54cc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 30 17:05:35 2010 +0200 ntdll: Add a workaround for Ubuntu's stupid ptrace breakage. --- dlls/ntdll/server.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index 8da00ca..df46935 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -45,6 +45,9 @@ #ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> #endif +#ifdef HAVE_SYS_PRCTL_H +# include <sys/prctl.h> +#endif #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif @@ -1013,6 +1016,10 @@ void server_init_process(void) #ifdef __APPLE__ send_server_task_port(); #endif +#if defined(__linux__) && defined(HAVE_PRCTL) + /* work around Ubuntu's ptrace breakage */ + if (server_pid != -1) prctl( 0x59616d61 /* PR_SET_PTRACER */, server_pid ); +#endif }
1
0
0
0
Alexandre Julliard : ntdll: Add support for retrieving the server pid from the socket credentials.
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: dec7effac0fb22b735d626edc86671148a6f0cb8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dec7effac0fb22b735d626edc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 30 17:05:13 2010 +0200 ntdll: Add support for retrieving the server pid from the socket credentials. --- dlls/ntdll/server.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index f7c2ef5..8da00ca 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -103,6 +103,7 @@ timeout_t server_start_time = 0; /* time of server startup */ sigset_t server_block_set; /* signals to block during server calls */ static int fd_socket = -1; /* socket to exchange file descriptors with the server */ +static pid_t server_pid; static RTL_CRITICAL_SECTION fd_cache_section; static RTL_CRITICAL_SECTION_DEBUG critsect_debug = @@ -402,6 +403,13 @@ static int receive_fd( obj_handle_t *handle ) { if (cmsg->cmsg_level != SOL_SOCKET) continue; if (cmsg->cmsg_type == SCM_RIGHTS) fd = *(int *)CMSG_DATA(cmsg); +#ifdef SCM_CREDENTIALS + else if (cmsg->cmsg_type == SCM_CREDENTIALS) + { + struct ucred *ucred = (struct ucred *)CMSG_DATA(cmsg); + server_pid = ucred->pid; + } +#endif } #endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ if (fd != -1) fcntl( fd, F_SETFD, FD_CLOEXEC ); /* in case MSG_CMSG_CLOEXEC is not supported */ @@ -960,6 +968,7 @@ void server_init_process(void) obj_handle_t version; const char *env_socket = getenv( "WINESERVERSOCKET" ); + server_pid = -1; if (env_socket) { fd_socket = atoi( env_socket ); @@ -981,6 +990,17 @@ void server_init_process(void) pthread_sigmask( SIG_BLOCK, &server_block_set, NULL ); /* receive the first thread request fd on the main socket */ +#ifdef SO_PASSCRED + if (server_pid == -1) + { + int enable = 1; + setsockopt( fd_socket, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable) ); + ntdll_get_thread_data()->request_fd = receive_fd( &version ); + enable = 0; + setsockopt( fd_socket, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable) ); + } + else +#endif ntdll_get_thread_data()->request_fd = receive_fd( &version ); if (version != SERVER_PROTOCOL_VERSION)
1
0
0
0
Alexandre Julliard : server: Make the fd passing code slightly more portable.
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: 179715251dbb399768ae0ef423ae094c4438face URL:
http://source.winehq.org/git/wine.git/?a=commit;h=179715251dbb399768ae0ef42…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 30 11:53:07 2010 +0200 server: Make the fd passing code slightly more portable. --- dlls/ntdll/server.c | 76 +++++++++++++++++-------------------------- server/request.c | 88 ++++++++++++++++++++++++++++----------------------- 2 files changed, 78 insertions(+), 86 deletions(-) diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index b3a8b21..f7c2ef5 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -99,20 +99,6 @@ static const enum cpu_type client_cpu = CPU_ARM; unsigned int server_cpus = 0; int is_wow64 = FALSE; -#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS -/* data structure used to pass an fd with sendmsg/recvmsg */ -struct cmsg_fd -{ - struct - { - size_t len; /* size of structure */ - int level; /* SOL_SOCKET */ - int type; /* SCM_RIGHTS */ - } header; - int fd; /* fd to pass */ -}; -#endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ - timeout_t server_start_time = 0; /* time of server startup */ sigset_t server_block_set; /* signals to block during server calls */ @@ -334,35 +320,36 @@ void server_leave_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sig */ void CDECL wine_server_send_fd( int fd ) { -#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS - struct cmsg_fd cmsg; -#endif struct send_fd data; struct msghdr msghdr; struct iovec vec; int ret; - vec.iov_base = (void *)&data; - vec.iov_len = sizeof(data); - - msghdr.msg_name = NULL; - msghdr.msg_namelen = 0; - msghdr.msg_iov = &vec; - msghdr.msg_iovlen = 1; - #ifdef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS msghdr.msg_accrights = (void *)&fd; msghdr.msg_accrightslen = sizeof(fd); #else /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ - cmsg.header.len = sizeof(cmsg.header) + sizeof(fd); - cmsg.header.level = SOL_SOCKET; - cmsg.header.type = SCM_RIGHTS; - cmsg.fd = fd; - msghdr.msg_control = &cmsg; - msghdr.msg_controllen = sizeof(cmsg.header) + sizeof(fd); + char cmsg_buffer[256]; + struct cmsghdr *cmsg; + msghdr.msg_control = cmsg_buffer; + msghdr.msg_controllen = sizeof(cmsg_buffer); msghdr.msg_flags = 0; + cmsg = CMSG_FIRSTHDR( &msghdr ); + cmsg->cmsg_len = CMSG_LEN( sizeof(fd) ); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + *(int *)CMSG_DATA(cmsg) = fd; + msghdr.msg_controllen = cmsg->cmsg_len; #endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ + msghdr.msg_name = NULL; + msghdr.msg_namelen = 0; + msghdr.msg_iov = &vec; + msghdr.msg_iovlen = 1; + + vec.iov_base = (void *)&data; + vec.iov_len = sizeof(data); + data.tid = GetCurrentThreadId(); data.fd = fd; @@ -385,24 +372,16 @@ void CDECL wine_server_send_fd( int fd ) static int receive_fd( obj_handle_t *handle ) { struct iovec vec; - int ret, fd; - -#ifdef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS struct msghdr msghdr; + int ret, fd = -1; - fd = -1; +#ifdef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS msghdr.msg_accrights = (void *)&fd; msghdr.msg_accrightslen = sizeof(fd); #else /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ - struct msghdr msghdr; - struct cmsg_fd cmsg; - - cmsg.header.len = sizeof(cmsg.header) + sizeof(fd); - cmsg.header.level = SOL_SOCKET; - cmsg.header.type = SCM_RIGHTS; - cmsg.fd = -1; - msghdr.msg_control = &cmsg; - msghdr.msg_controllen = sizeof(cmsg.header) + sizeof(fd); + char cmsg_buffer[256]; + msghdr.msg_control = cmsg_buffer; + msghdr.msg_controllen = sizeof(cmsg_buffer); msghdr.msg_flags = 0; #endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ @@ -418,8 +397,13 @@ static int receive_fd( obj_handle_t *handle ) if ((ret = recvmsg( fd_socket, &msghdr, MSG_CMSG_CLOEXEC )) > 0) { #ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS - fd = cmsg.fd; -#endif + struct cmsghdr *cmsg; + for (cmsg = CMSG_FIRSTHDR( &msghdr ); cmsg; cmsg = CMSG_NXTHDR( &msghdr, cmsg )) + { + if (cmsg->cmsg_level != SOL_SOCKET) continue; + if (cmsg->cmsg_type == SCM_RIGHTS) fd = *(int *)CMSG_DATA(cmsg); + } +#endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ if (fd != -1) fcntl( fd, F_SETFD, FD_CLOEXEC ); /* in case MSG_CMSG_CLOEXEC is not supported */ return fd; } diff --git a/server/request.c b/server/request.c index d2aebb3..cea23ef 100644 --- a/server/request.c +++ b/server/request.c @@ -126,23 +126,6 @@ int config_dir_fd = -1; /* file descriptor for the config dir */ static struct master_socket *master_socket; /* the master socket object */ static struct timeout_user *master_timeout; -/* socket communication static structures */ -static struct iovec myiovec; -static struct msghdr msghdr; -#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS -struct cmsg_fd -{ - struct - { - size_t len; /* size of structure */ - int level; /* SOL_SOCKET */ - int type; /* SCM_RIGHTS */ - } header; - int fd; /* fd to pass */ -}; -static struct cmsg_fd cmsg = { { sizeof(cmsg.header) + sizeof(cmsg.fd), SOL_SOCKET, SCM_RIGHTS }, -1 }; -#endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ - /* complain about a protocol error and terminate the client connection */ void fatal_protocol_error( struct thread *thread, const char *err, ... ) { @@ -359,25 +342,41 @@ error: /* receive a file descriptor on the process socket */ int receive_fd( struct process *process ) { + struct iovec vec; struct send_fd data; - int fd, ret; + struct msghdr msghdr; + int fd = -1, ret; #ifdef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS msghdr.msg_accrightslen = sizeof(int); msghdr.msg_accrights = (void *)&fd; #else /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ - msghdr.msg_control = &cmsg; - msghdr.msg_controllen = sizeof(cmsg.header) + sizeof(fd); - cmsg.fd = -1; + char cmsg_buffer[256]; + msghdr.msg_control = cmsg_buffer; + msghdr.msg_controllen = sizeof(cmsg_buffer); + msghdr.msg_flags = 0; #endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ - myiovec.iov_base = (void *)&data; - myiovec.iov_len = sizeof(data); + msghdr.msg_name = NULL; + msghdr.msg_namelen = 0; + msghdr.msg_iov = &vec; + msghdr.msg_iovlen = 1; + vec.iov_base = (void *)&data; + vec.iov_len = sizeof(data); ret = recvmsg( get_unix_fd( process->msg_fd ), &msghdr, 0 ); + #ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS - fd = cmsg.fd; -#endif + if (ret > 0) + { + struct cmsghdr *cmsg; + for (cmsg = CMSG_FIRSTHDR( &msghdr ); cmsg; cmsg = CMSG_NXTHDR( &msghdr, cmsg )) + { + if (cmsg->cmsg_level != SOL_SOCKET) continue; + if (cmsg->cmsg_type == SCM_RIGHTS) fd = *(int *)CMSG_DATA(cmsg); + } + } +#endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ if (ret == sizeof(data)) { @@ -412,6 +411,7 @@ int receive_fd( struct process *process ) { fprintf( stderr, "Protocol error: process %04x: partial recvmsg %d for fd\n", process->id, ret ); + if (fd != -1) close( fd ); kill_process( process, 1 ); } else @@ -429,23 +429,37 @@ int receive_fd( struct process *process ) /* send an fd to a client */ int send_client_fd( struct process *process, int fd, obj_handle_t handle ) { + struct iovec vec; + struct msghdr msghdr; int ret; - if (debug_level) - fprintf( stderr, "%04x: *fd* %04x -> %d\n", - current ? current->id : process->id, handle, fd ); - #ifdef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS msghdr.msg_accrightslen = sizeof(fd); msghdr.msg_accrights = (void *)&fd; #else /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ - msghdr.msg_control = &cmsg; - msghdr.msg_controllen = sizeof(cmsg.header) + sizeof(fd); - cmsg.fd = fd; + char cmsg_buffer[256]; + struct cmsghdr *cmsg; + msghdr.msg_control = cmsg_buffer; + msghdr.msg_controllen = sizeof(cmsg_buffer); + msghdr.msg_flags = 0; + cmsg = CMSG_FIRSTHDR( &msghdr ); + cmsg->cmsg_len = CMSG_LEN( sizeof(fd) ); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + *(int *)CMSG_DATA(cmsg) = fd; + msghdr.msg_controllen = cmsg->cmsg_len; #endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */ - myiovec.iov_base = (void *)&handle; - myiovec.iov_len = sizeof(handle); + msghdr.msg_name = NULL; + msghdr.msg_namelen = 0; + msghdr.msg_iov = &vec; + msghdr.msg_iovlen = 1; + + vec.iov_base = (void *)&handle; + vec.iov_len = sizeof(handle); + + if (debug_level) + fprintf( stderr, "%04x: *fd* %04x -> %d\n", current ? current->id : process->id, handle, fd ); ret = sendmsg( get_unix_fd( process->msg_fd ), &msghdr, 0 ); @@ -797,12 +811,6 @@ void open_master_socket(void) acquire_lock(); } - /* setup msghdr structure constant fields */ - msghdr.msg_name = NULL; - msghdr.msg_namelen = 0; - msghdr.msg_iov = &myiovec; - msghdr.msg_iovlen = 1; - /* init the process tracing mechanism */ init_tracing_mechanism(); }
1
0
0
0
Alexandre Julliard : dsound/tests: Mark some Vmware sound driver failures as broken.
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: 19da00a6a3a3e95cb43f7c5918151797a7992167 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19da00a6a3a3e95cb43f7c591…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 30 11:31:11 2010 +0200 dsound/tests: Mark some Vmware sound driver failures as broken. --- dlls/dsound/tests/ds3d.c | 4 ++-- dlls/dsound/tests/dsound.c | 12 ++++++------ dlls/dsound/tests/propset.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index ad380d8..9ad4e12 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -805,8 +805,8 @@ static HRESULT test_secondary(LPGUID lpGuid, int play, wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels); } rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary!=NULL,"IDirectSound_CreateSoundBuffer() " - "failed to create a %s%ssecondary buffer %s%s%s%sat %dx%dx%d (%s): %08x\n", + ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ + "IDirectSound_CreateSoundBuffer() failed to create a %s%ssecondary buffer %s%s%s%sat %dx%dx%d (%s): %08x\n", has_3dbuffer?"3D ":"", has_duplicate?"duplicated ":"", listener!=NULL||move_sound?"with ":"", move_listener?"moving ":"", listener!=NULL?"listener ":"", diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c index f059c20..02d93fd 100644 --- a/dlls/dsound/tests/dsound.c +++ b/dlls/dsound/tests/dsound.c @@ -326,7 +326,7 @@ static HRESULT test_dsound(LPGUID lpGuid) wfx.nBlockAlign); bufdesc.lpwfxFormat=&wfx; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary!=NULL, + ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ "IDirectSound_CreateSoundBuffer() failed to create a secondary " "buffer %08x\n",rc); if (rc==DS_OK && secondary!=NULL) { @@ -618,7 +618,7 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) wfx2.nSamplesPerSec,wfx2.wBitsPerSample,wfx2.nChannels); } rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary!=NULL, + ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); if (rc==DS_OK && secondary!=NULL) { @@ -729,7 +729,7 @@ static HRESULT test_secondary(LPGUID lpGuid) "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) " "and NULL, returned: %08x %p\n", rc, secondary); else - ok(rc==DS_OK && secondary!=NULL, + ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); } else @@ -883,8 +883,8 @@ static HRESULT test_block_align(LPGUID lpGuid) bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec + 1; bufdesc.lpwfxFormat=&wfx; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK,"IDirectSound_CreateSoundBuffer() " - "should have returned DS_OK, returned: %08x\n", rc); + ok(rc == DS_OK || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ + "IDirectSound_CreateSoundBuffer() should have returned DS_OK, returned: %08x\n", rc); if (rc==DS_OK && secondary!=NULL) { ZeroMemory(&dsbcaps, sizeof(dsbcaps)); @@ -993,7 +993,7 @@ static HRESULT test_frequency(LPGUID lpGuid) wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels); } rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary!=NULL, + ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); if (rc==DS_OK && secondary!=NULL) { diff --git a/dlls/dsound/tests/propset.c b/dlls/dsound/tests/propset.c index 5007fcc..fb902a4 100644 --- a/dlls/dsound/tests/propset.c +++ b/dlls/dsound/tests/propset.c @@ -616,8 +616,8 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, trace(" Testing a secondary buffer at %dx%dx%d\n", wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels); rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK&&secondary!=NULL,"IDirectSound_CreateSoundBuffer() " - "failed to create a secondary buffer: %08x\n",rc); + ok((rc==DS_OK && secondary!=NULL) || broken(rc == DSERR_CONTROLUNAVAIL), /* vmware drivers on w2k */ + "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer: %08x\n",rc); if (rc==DS_OK&&secondary!=NULL) { IKsPropertySet * pPropertySet=NULL; rc=IDirectSoundBuffer_QueryInterface(secondary,
1
0
0
0
Alexandre Julliard : ntdll/tests: Fix a test failure on 64-bit platforms.
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: 7a151d5e3e43231896d610603eec0f842f11f170 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7a151d5e3e43231896d610603…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 30 11:19:31 2010 +0200 ntdll/tests: Fix a test failure on 64-bit platforms. --- dlls/ntdll/tests/info.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index ee3d0c6..d228816 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1125,7 +1125,8 @@ static void test_queryvirtualmemory(void) ok (mbi.AllocationBase == module, "mbi.AllocationBase is 0x%p, expected 0x%p\n", mbi.AllocationBase, module); ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT); - ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READWRITE); + ok (mbi.Protect == PAGE_READWRITE || mbi.Protect == PAGE_WRITECOPY, + "mbi.Protect is 0x%x\n", mbi.Protect); trace("Check flags of read-write uninitialized data (.bss) at %p\n", rwtestbuf); status = pNtQueryVirtualMemory(NtCurrentProcess(), rwtestbuf, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount);
1
0
0
0
Gerald Pfeifer : setupx.dll16: Remove some unused code from VCP_CheckPaths.
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: 90021f6ea5cc63da67315436ec8d013b68d8131b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90021f6ea5cc63da67315436e…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Wed Sep 29 22:16:47 2010 +0200 setupx.dll16: Remove some unused code from VCP_CheckPaths. --- dlls/setupx.dll16/virtcopy.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/setupx.dll16/virtcopy.c b/dlls/setupx.dll16/virtcopy.c index 299041f..5137548 100644 --- a/dlls/setupx.dll16/virtcopy.c +++ b/dlls/setupx.dll16/virtcopy.c @@ -419,17 +419,16 @@ static RETERR16 VCP_CheckPaths(void) { DWORD n; LPVIRTNODE lpvn; - RETERR16 cbres; - cbres = VCP_Callback(&vcp_status, VCPM_VSTATPATHCHECKSTART, 0, 0, VCP_MsgRef); + VCP_Callback(&vcp_status, VCPM_VSTATPATHCHECKSTART, 0, 0, VCP_MsgRef); for (n = 0; n < vn_num; n++) { lpvn = pvnlist[n]; if (!lpvn) continue; /* FIXME: check paths of all VIRTNODEs here ! */ - cbres = VCP_Callback(&lpvn->vfsDst, VCPM_CHECKPATH, 0, (DWORD)lpvn, VCP_MsgRef); + VCP_Callback(&lpvn->vfsDst, VCPM_CHECKPATH, 0, (DWORD)lpvn, VCP_MsgRef); } - cbres = VCP_Callback(&vcp_status, VCPM_VSTATPATHCHECKEND, 0, 0, VCP_MsgRef); + VCP_Callback(&vcp_status, VCPM_VSTATPATHCHECKEND, 0, 0, VCP_MsgRef); return OK; }
1
0
0
0
Juan Lang : crypt32: Check revocation failures when verifying the SSL policy.
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: be3a5e368f97a6f8efeb35bde9c078f096b081d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be3a5e368f97a6f8efeb35bde…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Sep 29 14:12:33 2010 -0700 crypt32: Check revocation failures when verifying the SSL policy. --- dlls/crypt32/chain.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index 7525923..4b6fdba 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -3337,6 +3337,23 @@ static BOOL WINAPI verify_ssl_policy(LPCSTR szPolicyOID, CERT_TRUST_IS_NOT_VALID_FOR_USAGE, &pPolicyStatus->lChainIndex, &pPolicyStatus->lElementIndex); } + else if (pChainContext->TrustStatus.dwErrorStatus & + CERT_TRUST_IS_REVOKED && !(checks & SECURITY_FLAG_IGNORE_REVOCATION)) + { + pPolicyStatus->dwError = CERT_E_REVOKED; + find_element_with_error(pChainContext, + CERT_TRUST_IS_REVOKED, &pPolicyStatus->lChainIndex, + &pPolicyStatus->lElementIndex); + } + else if (pChainContext->TrustStatus.dwErrorStatus & + CERT_TRUST_IS_OFFLINE_REVOCATION && + !(checks & SECURITY_FLAG_IGNORE_REVOCATION)) + { + pPolicyStatus->dwError = CERT_E_REVOCATION_FAILURE; + find_element_with_error(pChainContext, + CERT_TRUST_IS_OFFLINE_REVOCATION, &pPolicyStatus->lChainIndex, + &pPolicyStatus->lElementIndex); + } else pPolicyStatus->dwError = NO_ERROR; /* We only need bother checking whether the name in the end certificate
1
0
0
0
Juan Lang : crypt32: Check usage when verifying the SSL policy.
by Alexandre Julliard
30 Sep '10
30 Sep '10
Module: wine Branch: master Commit: da11d66bffd7215806ae5c8ae1af99bd3552666c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da11d66bffd7215806ae5c8ae…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Sep 29 13:46:17 2010 -0700 crypt32: Check usage when verifying the SSL policy. --- dlls/crypt32/chain.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index fe6093d..7525923 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -3328,6 +3328,15 @@ static BOOL WINAPI verify_ssl_policy(LPCSTR szPolicyOID, CERT_TRUST_IS_NOT_TIME_VALID, &pPolicyStatus->lChainIndex, &pPolicyStatus->lElementIndex); } + else if (pChainContext->TrustStatus.dwErrorStatus & + CERT_TRUST_IS_NOT_VALID_FOR_USAGE && + !(checks & SECURITY_FLAG_IGNORE_WRONG_USAGE)) + { + pPolicyStatus->dwError = CERT_E_WRONG_USAGE; + find_element_with_error(pChainContext, + CERT_TRUST_IS_NOT_VALID_FOR_USAGE, &pPolicyStatus->lChainIndex, + &pPolicyStatus->lElementIndex); + } else pPolicyStatus->dwError = NO_ERROR; /* We only need bother checking whether the name in the end certificate
1
0
0
0
← Newer
1
2
3
4
5
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200