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
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
June 2018
----- 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
1 participants
629 discussions
Start a n
N
ew thread
Michael Müller : ntoskrnl: Implement ExInterlockedPopEntrySList.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: 62bbae08d8c573479c426869027dee50c80adb0c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=62bbae08d8c573479c426869…
Author: Michael Müller <michael(a)fds-team.de> Date: Mon Apr 16 05:01:03 2018 +0000 ntoskrnl: Implement ExInterlockedPopEntrySList. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit ae75d6a92b52db7c5bec5668c13ae007c4b08bc9) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 14 ++++++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- include/ddk/wdm.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 56c945d..1e63e3f 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -1651,6 +1651,20 @@ PSLIST_ENTRY WINAPI NTOSKRNL_InterlockedPopEntrySList( PSLIST_HEADER list ) /*********************************************************************** + * ExInterlockedPopEntrySList (NTOSKRNL.EXE.@) + */ +#ifdef DEFINE_FASTCALL2_ENTRYPOINT +DEFINE_FASTCALL2_ENTRYPOINT( NTOSKRNL_ExInterlockedPopEntrySList ) +PSLIST_ENTRY WINAPI __regs_NTOSKRNL_ExInterlockedPopEntrySList( PSLIST_HEADER list, PKSPIN_LOCK lock ) +#else +PSLIST_ENTRY WINAPI NTOSKRNL_ExInterlockedPopEntrySList( PSLIST_HEADER list, PKSPIN_LOCK lock ) +#endif +{ + return InterlockedPopEntrySList( list ); +} + + +/*********************************************************************** * InterlockedPushEntrySList (NTOSKRNL.EXE.@) */ #ifdef DEFINE_FASTCALL2_ENTRYPOINT diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 6599727..27797a2 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -5,7 +5,7 @@ @ stub ExInterlockedAddLargeStatistic @ stub ExInterlockedCompareExchange64 @ stub ExInterlockedFlushSList -@ stub ExInterlockedPopEntrySList +@ stdcall -norelay ExInterlockedPopEntrySList(ptr ptr) NTOSKRNL_ExInterlockedPopEntrySList @ stub ExInterlockedPushEntrySList @ stub ExReInitializeRundownProtection @ stdcall -norelay ExReleaseFastMutexUnsafe(ptr) diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index f9fb0a6..9fcec62 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1280,6 +1280,7 @@ PVOID WINAPI ExAllocatePoolWithTag(POOL_TYPE,SIZE_T,ULONG); PVOID WINAPI ExAllocatePoolWithQuotaTag(POOL_TYPE,SIZE_T,ULONG); void WINAPI ExFreePool(PVOID); void WINAPI ExFreePoolWithTag(PVOID,ULONG); +PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK); void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX); NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOID*);
1
0
0
0
Alexander Morozov : ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and ExReleaseFastMutexUnsafe.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: 733dc35ecf6ac286e433863fae20879ac1838a23 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=733dc35ecf6ac286e433863f…
Author: Alexander Morozov <amorozov(a)etersoft.ru> Date: Tue Apr 3 05:01:43 2018 +0000 ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and ExReleaseFastMutexUnsafe. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit fec2aadebe48aefd649d0abfceb6bc0165904421) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 28 ++++++++++++++++++++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 4 ++-- include/ddk/wdm.h | 2 ++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index f981814..56c945d 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -599,6 +599,34 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event ) /*********************************************************************** + * ExAcquireFastMutexUnsafe (NTOSKRNL.EXE.@) + */ +#ifdef DEFINE_FASTCALL1_ENTRYPOINT +DEFINE_FASTCALL1_ENTRYPOINT(ExAcquireFastMutexUnsafe) +void WINAPI __regs_ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex) +#else +void WINAPI ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex) +#endif +{ + FIXME("(%p): stub\n", FastMutex); +} + + +/*********************************************************************** + * ExReleaseFastMutexUnsafe (NTOSKRNL.EXE.@) + */ +#ifdef DEFINE_FASTCALL1_ENTRYPOINT +DEFINE_FASTCALL1_ENTRYPOINT(ExReleaseFastMutexUnsafe) +void WINAPI __regs_ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex) +#else +void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex) +#endif +{ + FIXME("(%p): stub\n", FastMutex); +} + + +/*********************************************************************** * IoAcquireCancelSpinLock (NTOSKRNL.EXE.@) */ void WINAPI IoAcquireCancelSpinLock(PKIRQL irql) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 9031f09..6599727 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -1,4 +1,4 @@ -@ stub ExAcquireFastMutexUnsafe +@ stdcall -norelay ExAcquireFastMutexUnsafe(ptr) @ stub ExAcquireRundownProtection @ stub ExAcquireRundownProtectionEx @ stub ExInitializeRundownProtection @@ -8,7 +8,7 @@ @ stub ExInterlockedPopEntrySList @ stub ExInterlockedPushEntrySList @ stub ExReInitializeRundownProtection -@ stub ExReleaseFastMutexUnsafe +@ stdcall -norelay ExReleaseFastMutexUnsafe(ptr) @ stub ExReleaseResourceLite @ stub ExReleaseRundownProtection @ stub ExReleaseRundownProtectionEx diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 61374a7..f9fb0a6 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1273,12 +1273,14 @@ static inline void IoSetCompletionRoutine(IRP *irp, PIO_COMPLETION_ROUTINE routi #define SYMBOLIC_LINK_QUERY 0x0001 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1) +void WINAPI ExAcquireFastMutexUnsafe(PFAST_MUTEX); PVOID WINAPI ExAllocatePool(POOL_TYPE,SIZE_T); PVOID WINAPI ExAllocatePoolWithQuota(POOL_TYPE,SIZE_T); PVOID WINAPI ExAllocatePoolWithTag(POOL_TYPE,SIZE_T,ULONG); PVOID WINAPI ExAllocatePoolWithQuotaTag(POOL_TYPE,SIZE_T,ULONG); void WINAPI ExFreePool(PVOID); void WINAPI ExFreePoolWithTag(PVOID,ULONG); +void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX); NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOID*); PVOID WINAPI IoAllocateErrorLogEntry(PVOID,UCHAR);
1
0
0
0
Piotr Caban : msvcp140: Add _Task_impl_base::_IsNonBlockingThread stub.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: 51d9a1d34e63e91890977e4ee6a4e0d0c9ff4f1e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=51d9a1d34e63e91890977e4e…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Apr 20 17:35:48 2018 +0200 msvcp140: Add _Task_impl_base::_IsNonBlockingThread stub. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a2d618ef22da3485a200f34e19ffbeace8fd5da4) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcp140/msvcp140.spec | 2 +- dlls/msvcp140/tests/msvcp140.c | 8 ++++++++ dlls/msvcp90/misc.c | 9 +++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec index ddf8ba7..03bc617 100644 --- a/dlls/msvcp140/msvcp140.spec +++ b/dlls/msvcp140/msvcp140.spec @@ -1443,7 +1443,7 @@ @ cdecl -arch=win32 ?_Iput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WPADI@Z(ptr ptr long ptr ptr long ptr long) num_put_wchar__Iput @ cdecl -arch=win64 ?_Iput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WPEAD_K@Z(ptr ptr ptr ptr long ptr long) num_put_wchar__Iput @ cdecl ?_IsCurrentOriginSTA@_ContextCallback@details@Concurrency@@CA_NXZ(ptr) _ContextCallback__IsCurrentOriginSTA -@ stub ?_IsNonBlockingThread@_Task_impl_base@details@Concurrency@@SA_NXZ +@ cdecl ?_IsNonBlockingThread@_Task_impl_base@details@Concurrency@@SA_NXZ() _Task_impl_base__IsNonBlockingThread @ cdecl -arch=win32 ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z(ptr ptr long) locale__Locimp__Locimp_Addfac @ cdecl -arch=win64 ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z(ptr ptr long) locale__Locimp__Locimp_Addfac @ cdecl -arch=win32 ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z(ptr ptr) locale__Locimp__Locimp_ctor diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c index 620e931..593e0ce 100644 --- a/dlls/msvcp140/tests/msvcp140.c +++ b/dlls/msvcp140/tests/msvcp140.c @@ -149,6 +149,7 @@ enum file_type { }; static unsigned int (__cdecl *p__Thrd_id)(void); +static MSVCP_bool (__cdecl *p__Task_impl_base__IsNonBlockingThread)(void); static task_continuation_context* (__thiscall *p_task_continuation_context_ctor)(task_continuation_context*); static void (__thiscall *p__ContextCallback__Assign)(_ContextCallback*, void*); static void (__thiscall *p__ContextCallback__CallInContext)(const _ContextCallback*, function_void_cdecl_void, MSVCP_bool); @@ -198,6 +199,7 @@ static BOOL init(void) } SET(p__Thrd_id, "_Thrd_id"); + SET(p__Task_impl_base__IsNonBlockingThread, "?_IsNonBlockingThread@_Task_impl_base@details@Concurrency@@SA_NXZ"); SET(p__ContextCallback__IsCurrentOriginSTA, "?_IsCurrentOriginSTA@_ContextCallback@details@Concurrency@@CA_NXZ"); if(sizeof(void*) == 8) { /* 64-bit initialization */ @@ -276,6 +278,11 @@ static void test_thrd(void) p__Thrd_id(), GetCurrentThreadId()); } +static void test__Task_impl_base__IsNonBlockingThread(void) +{ + ok(!p__Task_impl_base__IsNonBlockingThread(), "_IsNonBlockingThread() returned true\n"); +} + static struct { int value[2]; const char* export_name; @@ -1058,6 +1065,7 @@ START_TEST(msvcp140) { if(!init()) return; test_thrd(); + test__Task_impl_base__IsNonBlockingThread(); test_vbtable_size_exports(); test_task_continuation_context(); test__ContextCallback(); diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index 953f88b..2d5101c 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -1938,3 +1938,12 @@ void __thiscall _vector_base_v4__Internal_throw_exception(void/*_vector_base_v4* throw_exception(exceptions[idx].type, exceptions[idx].msg); } #endif + +#if _MSVCP_VER >= 140 +/* ?_IsNonBlockingThread@_Task_impl_base@details@Concurrency@@SA_NXZ */ +MSVCP_bool __cdecl _Task_impl_base__IsNonBlockingThread(void) +{ + FIXME("() stub\n"); + return FALSE; +} +#endif
1
0
0
0
Sebastian Lackner : advapi32/tests: Add basic tests for BuildSecurityDescriptor.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: 3cfdb637371e4acf6024cbe5ef14d3972d4cab8d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3cfdb637371e4acf6024cbe5…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Wed Apr 18 00:25:28 2018 +0000 advapi32/tests: Add basic tests for BuildSecurityDescriptor. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 731f22835e1cac8dde99931ec87958629b235c0e) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/advapi32/tests/security.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 57889dc..727ca6b 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -7314,6 +7314,42 @@ static void test_GetExplicitEntriesFromAclW(void) HeapFree(GetProcessHeap(), 0, old_acl); } +static void test_BuildSecurityDescriptorW(void) +{ + SECURITY_DESCRIPTOR old_sd, *new_sd, *rel_sd; + ULONG new_sd_size; + DWORD buf_size; + char buf[1024]; + BOOL success; + DWORD ret; + + InitializeSecurityDescriptor(&old_sd, SECURITY_DESCRIPTOR_REVISION); + + buf_size = sizeof(buf); + rel_sd = (SECURITY_DESCRIPTOR *)buf; + success = MakeSelfRelativeSD(&old_sd, rel_sd, &buf_size); + ok(success, "MakeSelfRelativeSD failed with %u\n", GetLastError()); + + new_sd = NULL; + new_sd_size = 0; + ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, NULL, &new_sd_size, (void **)&new_sd); + ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %u\n", ret); + ok(new_sd != NULL, "expected new_sd != NULL\n"); + LocalFree(new_sd); + + new_sd = (void *)0xdeadbeef; + ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, &old_sd, &new_sd_size, (void **)&new_sd); + ok(ret == ERROR_INVALID_SECURITY_DESCR, "expected ERROR_INVALID_SECURITY_DESCR, got %u\n", ret); + ok(new_sd == (void *)0xdeadbeef, "expected new_sd == 0xdeadbeef, got %p\n", new_sd); + + new_sd = NULL; + new_sd_size = 0; + ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, rel_sd, &new_sd_size, (void **)&new_sd); + ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %u\n", ret); + ok(new_sd != NULL, "expected new_sd != NULL\n"); + LocalFree(new_sd); +} + START_TEST(security) { init(); @@ -7368,6 +7404,7 @@ START_TEST(security) test_maximum_allowed(); test_token_label(); test_GetExplicitEntriesFromAclW(); + test_BuildSecurityDescriptorW(); /* Must be the last test, modifies process token */ test_token_security_descriptor();
1
0
0
0
Andrew Wesie : advapi32: Implement BuildSecurityDescriptorW.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: e43a9b1172889ca51855b18810b649c0846b5ff9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e43a9b1172889ca51855b188…
Author: Andrew Wesie <awesie(a)gmail.com> Date: Wed Apr 18 00:25:27 2018 +0000 advapi32: Implement BuildSecurityDescriptorW. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit b58577aa5491747cf8bc36a60fb71bcf82f0553f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/advapi32/security.c | 218 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 164 insertions(+), 54 deletions(-) diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index f0c133e..31ef4b2 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -48,6 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi); static BOOL ParseStringSidToSid(LPCWSTR StringSid, PSID pSid, LPDWORD cBytes); +static DWORD trustee_to_sid(DWORD nDestinationSidLength, PSID pDestinationSid, PTRUSTEEW pTrustee); typedef struct _ACEFLAG { @@ -1254,16 +1255,122 @@ DWORD WINAPI BuildSecurityDescriptorW( IN ULONG cCountOfAccessEntries, IN PEXPLICIT_ACCESSW pListOfAccessEntries, IN ULONG cCountOfAuditEntries, - IN PEXPLICIT_ACCESSW pListofAuditEntries, + IN PEXPLICIT_ACCESSW pListOfAuditEntries, IN PSECURITY_DESCRIPTOR pOldSD, IN OUT PULONG lpdwBufferLength, OUT PSECURITY_DESCRIPTOR* pNewSD) { - FIXME("(%p,%p,%d,%p,%d,%p,%p,%p,%p) stub!\n",pOwner,pGroup, - cCountOfAccessEntries,pListOfAccessEntries,cCountOfAuditEntries, - pListofAuditEntries,pOldSD,lpdwBufferLength,pNewSD); + SECURITY_DESCRIPTOR desc; + NTSTATUS status; + DWORD ret = ERROR_SUCCESS; + + TRACE("(%p,%p,%d,%p,%d,%p,%p,%p,%p)\n", pOwner, pGroup, + cCountOfAccessEntries, pListOfAccessEntries, cCountOfAuditEntries, + pListOfAuditEntries, pOldSD, lpdwBufferLength, pNewSD); - return ERROR_CALL_NOT_IMPLEMENTED; + if (pOldSD) + { + SECURITY_DESCRIPTOR_CONTROL control; + DWORD desc_size, dacl_size = 0, sacl_size = 0, owner_size = 0, group_size = 0; + PACL dacl = NULL, sacl = NULL; + PSID owner = NULL, group = NULL; + DWORD revision; + + if ((status = RtlGetControlSecurityDescriptor( pOldSD, &control, &revision )) != STATUS_SUCCESS) + return RtlNtStatusToDosError( status ); + if (!(control & SE_SELF_RELATIVE)) + return ERROR_INVALID_SECURITY_DESCR; + + desc_size = sizeof(desc); + status = RtlSelfRelativeToAbsoluteSD( pOldSD, &desc, &desc_size, dacl, &dacl_size, sacl, &sacl_size, + owner, &owner_size, group, &group_size ); + if (status == STATUS_BUFFER_TOO_SMALL) + { + if (dacl_size) + dacl = LocalAlloc( LMEM_FIXED, dacl_size ); + if (sacl_size) + sacl = LocalAlloc( LMEM_FIXED, sacl_size ); + if (owner_size) + owner = LocalAlloc( LMEM_FIXED, owner_size ); + if (group_size) + group = LocalAlloc( LMEM_FIXED, group_size ); + + desc_size = sizeof(desc); + status = RtlSelfRelativeToAbsoluteSD( pOldSD, &desc, &desc_size, dacl, &dacl_size, sacl, &sacl_size, + owner, &owner_size, group, &group_size ); + } + if (status != STATUS_SUCCESS) + { + LocalFree( dacl ); + LocalFree( sacl ); + LocalFree( owner ); + LocalFree( group ); + return RtlNtStatusToDosError( status ); + } + } + else + { + if ((status = RtlCreateSecurityDescriptor( &desc, SECURITY_DESCRIPTOR_REVISION )) != STATUS_SUCCESS) + return RtlNtStatusToDosError( status ); + } + + if (pOwner) + { + LocalFree( desc.Owner ); + desc.Owner = LocalAlloc( LMEM_FIXED, sizeof(MAX_SID) ); + if ((ret = trustee_to_sid( sizeof(MAX_SID), desc.Owner, pOwner ))) + goto done; + } + + if (pGroup) + { + LocalFree( desc.Group ); + desc.Group = LocalAlloc( LMEM_FIXED, sizeof(MAX_SID) ); + if ((ret = trustee_to_sid( sizeof(MAX_SID), desc.Group, pGroup ))) + goto done; + } + + if (pListOfAccessEntries) + { + PACL new_dacl; + + if ((ret = SetEntriesInAclW( cCountOfAccessEntries, pListOfAccessEntries, desc.Dacl, &new_dacl ))) + goto done; + + LocalFree( desc.Dacl ); + desc.Dacl = new_dacl; + desc.Control |= SE_DACL_PRESENT; + } + + if (pListOfAuditEntries) + { + PACL new_sacl; + + if ((ret = SetEntriesInAclW( cCountOfAuditEntries, pListOfAuditEntries, desc.Sacl, &new_sacl ))) + goto done; + + LocalFree( desc.Sacl ); + desc.Sacl = new_sacl; + desc.Control |= SE_SACL_PRESENT; + } + + *lpdwBufferLength = RtlLengthSecurityDescriptor( &desc ); + *pNewSD = LocalAlloc( LMEM_FIXED, *lpdwBufferLength ); + + if ((status = RtlMakeSelfRelativeSD( &desc, *pNewSD, lpdwBufferLength )) != STATUS_SUCCESS) + { + ret = RtlNtStatusToDosError( status ); + LocalFree( *pNewSD ); + *pNewSD = NULL; + } + +done: + /* free absolute descriptor */ + LocalFree( desc.Owner ); + LocalFree( desc.Group ); + LocalFree( desc.Sacl ); + LocalFree( desc.Dacl ); + return ret; } /****************************************************************************** @@ -3753,6 +3860,56 @@ static void free_trustee_name(TRUSTEE_FORM form, WCHAR *trustee_nameW) } } +static DWORD trustee_to_sid( DWORD nDestinationSidLength, PSID pDestinationSid, PTRUSTEEW pTrustee ) +{ + if (pTrustee->MultipleTrusteeOperation == TRUSTEE_IS_IMPERSONATE) + { + WARN("bad multiple trustee operation %d\n", pTrustee->MultipleTrusteeOperation); + return ERROR_INVALID_PARAMETER; + } + + switch (pTrustee->TrusteeForm) + { + case TRUSTEE_IS_SID: + if (!CopySid(nDestinationSidLength, pDestinationSid, pTrustee->ptstrName)) + { + WARN("bad sid %p\n", pTrustee->ptstrName); + return ERROR_INVALID_PARAMETER; + } + break; + case TRUSTEE_IS_NAME: + { + DWORD sid_size = nDestinationSidLength; + DWORD domain_size = MAX_COMPUTERNAME_LENGTH + 1; + SID_NAME_USE use; + if (!strcmpW( pTrustee->ptstrName, CURRENT_USER )) + { + if (!lookup_user_account_name( pDestinationSid, &sid_size, NULL, &domain_size, &use )) + { + return GetLastError(); + } + } + else if (!LookupAccountNameW(NULL, pTrustee->ptstrName, pDestinationSid, &sid_size, NULL, &domain_size, &use)) + { + WARN("bad user name %s\n", debugstr_w(pTrustee->ptstrName)); + return ERROR_INVALID_PARAMETER; + } + break; + } + case TRUSTEE_IS_OBJECTS_AND_SID: + FIXME("TRUSTEE_IS_OBJECTS_AND_SID unimplemented\n"); + break; + case TRUSTEE_IS_OBJECTS_AND_NAME: + FIXME("TRUSTEE_IS_OBJECTS_AND_NAME unimplemented\n"); + break; + default: + WARN("bad trustee form %d\n", pTrustee->TrusteeForm); + return ERROR_INVALID_PARAMETER; + } + + return ERROR_SUCCESS; +} + /****************************************************************************** * SetEntriesInAclA [ADVAPI32.@] */ @@ -3848,56 +4005,9 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries, pEntries[i].Trustee.TrusteeForm, pEntries[i].Trustee.TrusteeType, pEntries[i].Trustee.ptstrName); - if (pEntries[i].Trustee.MultipleTrusteeOperation == TRUSTEE_IS_IMPERSONATE) - { - WARN("bad multiple trustee operation %d for trustee %d\n", pEntries[i].Trustee.MultipleTrusteeOperation, i); - ret = ERROR_INVALID_PARAMETER; - goto exit; - } - - switch (pEntries[i].Trustee.TrusteeForm) - { - case TRUSTEE_IS_SID: - if (!CopySid(FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]), - ppsid[i], pEntries[i].Trustee.ptstrName)) - { - WARN("bad sid %p for trustee %d\n", pEntries[i].Trustee.ptstrName, i); - ret = ERROR_INVALID_PARAMETER; - goto exit; - } - break; - case TRUSTEE_IS_NAME: - { - DWORD sid_size = FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]); - DWORD domain_size = MAX_COMPUTERNAME_LENGTH + 1; - SID_NAME_USE use; - if (!strcmpW( pEntries[i].Trustee.ptstrName, CURRENT_USER )) - { - if (!lookup_user_account_name( ppsid[i], &sid_size, NULL, &domain_size, &use )) - { - ret = GetLastError(); - goto exit; - } - } - else if (!LookupAccountNameW(NULL, pEntries[i].Trustee.ptstrName, ppsid[i], &sid_size, NULL, &domain_size, &use)) - { - WARN("bad user name %s for trustee %d\n", debugstr_w(pEntries[i].Trustee.ptstrName), i); - ret = ERROR_INVALID_PARAMETER; - goto exit; - } - break; - } - case TRUSTEE_IS_OBJECTS_AND_SID: - FIXME("TRUSTEE_IS_OBJECTS_AND_SID unimplemented\n"); - break; - case TRUSTEE_IS_OBJECTS_AND_NAME: - FIXME("TRUSTEE_IS_OBJECTS_AND_NAME unimplemented\n"); - break; - default: - WARN("bad trustee form %d for trustee %d\n", pEntries[i].Trustee.TrusteeForm, i); - ret = ERROR_INVALID_PARAMETER; + ret = trustee_to_sid( FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]), ppsid[i], &pEntries[i].Trustee); + if (ret) goto exit; - } /* Note: we overestimate the ACL size here as a tradeoff between * instructions (simplicity) and memory */
1
0
0
0
Austin English : ntdsapi: Add DsCrackNamesA/W stubs.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: 14bbb6a7ede4e308f2616bc8869d5e3f2f74ef75 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=14bbb6a7ede4e308f2616bc8…
Author: Austin English <austinenglish(a)gmail.com> Date: Fri Apr 13 16:11:47 2018 -0500 ntdsapi: Add DsCrackNamesA/W stubs. Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 369c163929dc82c66b65077a5e28d0821ec8b382) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- ...-win-security-activedirectoryclient-l1-1-0.spec | 2 +- dlls/ntdsapi/ntdsapi.c | 23 +++++++++ dlls/ntdsapi/ntdsapi.spec | 4 +- include/ntdsapi.h | 59 ++++++++++++++++++++++ 4 files changed, 85 insertions(+), 3 deletions(-) diff --git a/dlls/api-ms-win-security-activedirectoryclient-l1-1-0/api-ms-win-security-activedirectoryclient-l1-1-0.spec b/dlls/api-ms-win-security-activedirectoryclient-l1-1-0/api-ms-win-security-activedirectoryclient-l1-1-0.spec index eef1c40..8f897f7 100644 --- a/dlls/api-ms-win-security-activedirectoryclient-l1-1-0/api-ms-win-security-activedirectoryclient-l1-1-0.spec +++ b/dlls/api-ms-win-security-activedirectoryclient-l1-1-0/api-ms-win-security-activedirectoryclient-l1-1-0.spec @@ -1,5 +1,5 @@ @ stub DsBindWithSpnExW -@ stub DsCrackNamesW +@ stdcall DsCrackNamesW(ptr long long long long ptr ptr) ntdsapi.DsCrackNamesW @ stub DsFreeDomainControllerInfoW @ stub DsFreeNameResultW @ stub DsFreePasswordCredentials diff --git a/dlls/ntdsapi/ntdsapi.c b/dlls/ntdsapi/ntdsapi.c index ee0c837..003b1a2 100644 --- a/dlls/ntdsapi/ntdsapi.c +++ b/dlls/ntdsapi/ntdsapi.c @@ -204,6 +204,9 @@ DWORD WINAPI DsServerRegisterSpnW(DS_SPN_WRITE_OP operation, LPCWSTR ServiceClas return ERROR_CALL_NOT_IMPLEMENTED; } +/*********************************************************************** + * DsClientMakeSpnForTargetServerW (NTDSAPI.@) + */ DWORD WINAPI DsClientMakeSpnForTargetServerW(LPCWSTR class, LPCWSTR name, DWORD *buflen, LPWSTR buf) { DWORD len; @@ -229,3 +232,23 @@ DWORD WINAPI DsClientMakeSpnForTargetServerW(LPCWSTR class, LPCWSTR name, DWORD return ERROR_SUCCESS; } + +/*********************************************************************** + * DsCrackNamesA (NTDSAPI.@) + */ +DWORD WINAPI DsCrackNamesA(HANDLE handle, DS_NAME_FLAGS flags, DS_NAME_FORMAT offered, DS_NAME_FORMAT desired, + DWORD num, const CHAR **names, PDS_NAME_RESULTA *result) +{ + FIXME("(%p %u %u %u %u %p %p stub\n", handle, flags, offered, desired, num, names, result); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +/*********************************************************************** + * DsCrackNamesW (NTDSAPI.@) + */ +DWORD WINAPI DsCrackNamesW(HANDLE handle, DS_NAME_FLAGS flags, DS_NAME_FORMAT offered, DS_NAME_FORMAT desired, + DWORD num, const WCHAR **names, PDS_NAME_RESULTW *result) +{ + FIXME("(%p %u %u %u %u %p %p stub\n", handle, flags, offered, desired, num, names, result); + return ERROR_CALL_NOT_IMPLEMENTED; +} diff --git a/dlls/ntdsapi/ntdsapi.spec b/dlls/ntdsapi/ntdsapi.spec index 925cb71..bc7827d 100644 --- a/dlls/ntdsapi/ntdsapi.spec +++ b/dlls/ntdsapi/ntdsapi.spec @@ -8,8 +8,8 @@ @ stub DsBindWithSpnW @ stub DsClientMakeSpnForTargetServerA @ stdcall DsClientMakeSpnForTargetServerW(wstr wstr ptr ptr) -@ stub DsCrackNamesA -@ stub DsCrackNamesW +@ stdcall DsCrackNamesA(ptr long long long long ptr ptr) +@ stdcall DsCrackNamesW(ptr long long long long ptr ptr) @ stub DsCrackSpn2A @ stub DsCrackSpn2W @ stub DsCrackSpn3W diff --git a/include/ntdsapi.h b/include/ntdsapi.h index 672ea63..099c205 100644 --- a/include/ntdsapi.h +++ b/include/ntdsapi.h @@ -35,6 +35,30 @@ DWORD WINAPI DsMakeSpnW(LPCWSTR, LPCWSTR, LPCWSTR, USHORT, LPCWSTR, DWORD*, LPWS typedef enum { + DS_NAME_NO_FLAGS = 0x0, + DS_NAME_FLAG_SYNTACTICAL_ONLY = 0x1, + DS_NAME_FLAG_EVAL_AT_DC = 0x2, + DS_NAME_FLAG_GCVERIFY = 0x4, + DS_NAME_FLAG_TRUST_REFERRAL = 0x8 +} DS_NAME_FLAGS; + +typedef enum +{ + DS_UNKNOWN_NAME = 0, + DS_FQDN_1779_NAME = 1, + DS_NT4_ACCOUNT_NAME = 2, + DS_DISPLAY_NAME = 3, + DS_UNIQUE_ID_NAME = 6, + DS_CANONICAL_NAME = 7, + DS_USER_PRINCIPAL_NAME = 8, + DS_CANONICAL_NAME_EX = 9, + DS_SERVICE_PRINCIPAL_NAME = 10, + DS_SID_OR_SID_HISTORY_NAME = 11, + DS_DNS_DOMAIN_NAME = 12 +} DS_NAME_FORMAT; + +typedef enum +{ DS_SPN_DNS_HOST = 0, DS_SPN_DN_HOST = 1, DS_SPN_NB_HOST = 2, @@ -50,6 +74,41 @@ typedef enum DS_SPN_DELETE_SPN_OP = 2 } DS_SPN_WRITE_OP; +typedef struct +{ + DWORD status; + LPSTR pDomain; + LPSTR pName; +} DS_NAME_RESULT_ITEMA, *PDS_NAME_RESULT_ITEMA; + +typedef struct +{ + DWORD status; + LPWSTR pDomain; + LPWSTR pName; +} DS_NAME_RESULT_ITEMW, *PDS_NAME_RESULT_ITEMW; + +DECL_WINELIB_TYPE_AW(DS_NAME_RESULT_ITEM) +DECL_WINELIB_TYPE_AW(PDS_NAME_RESULT_ITEM) + +typedef struct +{ + DWORD cItems; + PDS_NAME_RESULT_ITEMA rItems; +} DS_NAME_RESULTA, *PDS_NAME_RESULTA; + +typedef struct +{ + DWORD cItems; + PDS_NAME_RESULT_ITEMW rItems; +} DS_NAME_RESULTW, *PDS_NAME_RESULTW; + +DECL_WINELIB_TYPE_AW(DS_NAME_RESULT) +DECL_WINELIB_TYPE_AW(PDS_NAME_RESULT) + +DWORD WINAPI DsCrackNamesA(HANDLE handle, DS_NAME_FLAGS flags, DS_NAME_FORMAT offered, DS_NAME_FORMAT desired, DWORD num, const CHAR **names, PDS_NAME_RESULTA *result); +DWORD WINAPI DsCrackNamesW(HANDLE handle, DS_NAME_FLAGS flags, DS_NAME_FORMAT offered, DS_NAME_FORMAT desired, DWORD num, const WCHAR **names, PDS_NAME_RESULTW *result); +#define DsCrackNames WINELIB_NAME_AW(DsCrackNames) DWORD WINAPI DsServerRegisterSpnA(DS_SPN_WRITE_OP operation, LPCSTR ServiceClass, LPCSTR UserObjectDN); DWORD WINAPI DsServerRegisterSpnW(DS_SPN_WRITE_OP operation, LPCWSTR ServiceClass, LPCWSTR UserObjectDN); #define DsServerRegisterSpn WINELIB_NAME_AW(DsServerRegisterSpn)
1
0
0
0
Dmitry Timoshkov : dinput: The DIK_ key code should match the scan code.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: 710f3d751d9078aa0a6155f90e2b8cbc35349f26 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=710f3d751d9078aa0a6155f9…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Apr 16 22:30:47 2018 +0800 dinput: The DIK_ key code should match the scan code. This reverts commit 304ff3c7280a53b7cbadfa83eaeda458ff5959d1. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit d341b0a86b0d6264677635ba658535a63509b8bc) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dinput/keyboard.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index 4c3c38e..e1ba15e 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -69,26 +69,10 @@ static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(SysKeyboardIm static BYTE map_dik_code(DWORD scanCode, DWORD vkCode) { - static const BYTE asciiCodes[] = - {/*32*/ DIK_SPACE,0,0,0,0,0,0,DIK_APOSTROPHE, - /*40*/ 0,0,0,0,DIK_COMMA,DIK_MINUS,DIK_PERIOD,DIK_SLASH, - /*48*/ DIK_0,DIK_1,DIK_2,DIK_3,DIK_4,DIK_5,DIK_6,DIK_7, - /*56*/ DIK_8,DIK_9,DIK_COLON,DIK_SEMICOLON,0,DIK_EQUALS,0,0, - /*64*/ DIK_AT,DIK_A,DIK_B,DIK_C,DIK_D,DIK_E,DIK_F,DIK_G, - /*72*/ DIK_H,DIK_I,DIK_J,DIK_K,DIK_L,DIK_M,DIK_N,DIK_O, - /*80*/ DIK_P,DIK_Q,DIK_R,DIK_S,DIK_T,DIK_U,DIK_V,DIK_W, - /*88*/ DIK_X,DIK_Y,DIK_Z,DIK_LBRACKET,0,DIK_RBRACKET,DIK_CIRCUMFLEX,DIK_UNDERLINE} /*95*/ ; - - BYTE out_code = 0; - WCHAR c = MapVirtualKeyW(vkCode,MAPVK_VK_TO_CHAR); - - if (c > 31 && c < 96) - out_code = asciiCodes[c - 32]; - - if (out_code == 0) - out_code = scanCode; - - return out_code; + if (!scanCode) + scanCode = MapVirtualKeyW(vkCode, MAPVK_VK_TO_VSC); + + return scanCode; } static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam )
1
0
0
0
Alistair Leslie-Hughes : winedevice: Improve error handling when a driver fails to load.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: 19270773fe2d34b86cb3b19a76d20a638124b333 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=19270773fe2d34b86cb3b19a…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Apr 9 02:18:01 2018 +0000 winedevice: Improve error handling when a driver fails to load. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit dd2624a24fba400bf59b9396e496d16c43d399d9) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- programs/winedevice/device.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c index 9da34ec..fa8b268 100644 --- a/programs/winedevice/device.c +++ b/programs/winedevice/device.c @@ -50,12 +50,15 @@ static SC_HANDLE manager_handle; static BOOL shutdown_in_progress; static HANDLE stop_event; +#define EVENT_STARTED 0 +#define EVENT_ERROR 1 + struct wine_driver { struct wine_rb_entry entry; SERVICE_STATUS_HANDLE handle; - HANDLE started; + HANDLE events[2]; DRIVER_OBJECT *driver_obj; WCHAR name[1]; }; @@ -391,7 +394,7 @@ static void WINAPI async_create_driver( PTP_CALLBACK_INSTANCE instance, void *co goto error; } - SetEvent(driver->started); + SetEvent(driver->events[EVENT_STARTED]); EnterCriticalSection( &drivers_cs ); driver->driver_obj = driver_obj; @@ -401,6 +404,7 @@ static void WINAPI async_create_driver( PTP_CALLBACK_INSTANCE instance, void *co return; error: + SetEvent(driver->events[EVENT_ERROR]); EnterCriticalSection( &drivers_cs ); wine_rb_remove( &wine_drivers, &driver->entry ); LeaveCriticalSection( &drivers_cs ); @@ -416,6 +420,7 @@ static NTSTATUS create_driver( const WCHAR *driver_name ) TP_CALLBACK_ENVIRON environment; struct wine_driver *driver; DWORD length; + DWORD ret; length = FIELD_OFFSET( struct wine_driver, name[strlenW(driver_name) + 1] ); if (!(driver = HeapAlloc( GetProcessHeap(), 0, length ))) @@ -444,14 +449,18 @@ static NTSTATUS create_driver( const WCHAR *driver_name ) environment.Version = 1; environment.CleanupGroup = cleanup_group; - driver->started = CreateEventW(NULL, TRUE, FALSE, NULL); + driver->events[EVENT_STARTED] = CreateEventW(NULL, TRUE, FALSE, NULL); + driver->events[EVENT_ERROR] = CreateEventW(NULL, TRUE, FALSE, NULL); /* don't block the service control handler */ if (!TrySubmitThreadpoolCallback( async_create_driver, driver, &environment )) async_create_driver( NULL, driver ); /* Windows wait 30 Seconds */ - if(WaitForSingleObject(driver->started, 30000) == WAIT_TIMEOUT) + ret = WaitForMultipleObjects(2, driver->events, FALSE, 30000); + if(ret == WAIT_OBJECT_0 + EVENT_ERROR) + return STATUS_UNSUCCESSFUL; + else if(ret == WAIT_TIMEOUT) return ERROR_SERVICE_REQUEST_TIMEOUT; return STATUS_SUCCESS; @@ -462,7 +471,8 @@ static void wine_drivers_rb_destroy( struct wine_rb_entry *entry, void *context if (unload_driver( entry, TRUE ) != STATUS_SUCCESS) { struct wine_driver *driver = WINE_RB_ENTRY_VALUE( entry, struct wine_driver, entry ); - CloseHandle(driver->started); + CloseHandle(driver->events[EVENT_STARTED]); + CloseHandle(driver->events[EVENT_ERROR]); ObDereferenceObject( driver->driver_obj ); CloseServiceHandle( (void *)driver->handle ); HeapFree( GetProcessHeap(), 0, driver );
1
0
0
0
Dmitry Timoshkov : winspool.drv: Add A0, A1 and A2 paper sizes to generic.ppd.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: 78f49e961d4775da3b1ed64eda72deca5f531e36 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=78f49e961d4775da3b1ed64e…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Apr 9 11:41:26 2018 +0800 winspool.drv: Add A0, A1 and A2 paper sizes to generic.ppd. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit ba5fe9a31772c563a5cf2f1c9e36a6f0f6a35eec) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winspool.drv/generic.ppd | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/winspool.drv/generic.ppd b/dlls/winspool.drv/generic.ppd index b6e4628..9d63e2e 100644 --- a/dlls/winspool.drv/generic.ppd +++ b/dlls/winspool.drv/generic.ppd @@ -22,6 +22,9 @@ *UIConstraints: *PageSize Executive *InputSlot Envelope *UIConstraints: *PageSize Letter *InputSlot Envelope *UIConstraints: *PageSize Legal *InputSlot Envelope +*UIConstraints: *PageSize A0 *InputSlot Envelope +*UIConstraints: *PageSize A1 *InputSlot Envelope +*UIConstraints: *PageSize A2 *InputSlot Envelope *UIConstraints: *PageSize A3 *InputSlot Envelope *UIConstraints: *PageSize A4 *InputSlot Envelope *UIConstraints: *PageSize A5 *InputSlot Envelope @@ -33,6 +36,9 @@ *PageSize Letter/Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice" *PageSize Legal/Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice" *PageSize Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice" +*PageSize A0/A0: "<</PageSize[2384 3370]/ImagingBBox null>>setpagedevice" +*PageSize A1/A1: "<</PageSize[1684 2384]/ImagingBBox null>>setpagedevice" +*PageSize A2/A2: "<</PageSize[1191 1684]/ImagingBBox null>>setpagedevice" *PageSize A3/A3: "<</PageSize[842 1191]/ImagingBBox null>>setpagedevice" *PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice" *PageSize A5/A5: "<</PageSize[420 595]/ImagingBBox null>>setpagedevice" @@ -50,6 +56,9 @@ *PageRegion Letter/Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice" *PageRegion Legal/Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice" *PageRegion Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice" +*PageRegion A0/A0: "<</PageSize[2384 3370]/ImagingBBox null>>setpagedevice" +*PageRegion A1/A1: "<</PageSize[1684 2384]/ImagingBBox null>>setpagedevice" +*PageRegion A2/A2: "<</PageSize[1191 1684]/ImagingBBox null>>setpagedevice" *PageRegion A3/A3: "<</PageSize[842 1191]/ImagingBBox null>>setpagedevice" *PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice" *PageRegion A5/A5: "<</PageSize[421 595]/ImagingBBox null>>setpagedevice" @@ -65,6 +74,9 @@ *ImageableArea Letter/US Letter: "18 18 594 774" *ImageableArea Legal/US Legal: "18 18 594 990" *ImageableArea Executive/Executive: "18 18 504 738" +*ImageableArea A0/A0: "12 12 2372 3358" +*ImageableArea A1/A1: "12 12 1672 2372" +*ImageableArea A2/A2: "12 12 1179 1672" *ImageableArea A3/A3: "12 12 830 1179" *ImageableArea A4/A4: "18 18 577 824" *ImageableArea A5/A5: "18 36 403 559" @@ -79,6 +91,9 @@ *PaperDimension Letter/Letter: "612 792" *PaperDimension Legal/Legal: "612 1008" *PaperDimension Executive/Executive: "522 756" +*PaperDimension A0/A0: "2384 3370" +*PaperDimension A1/A1: "1684 2384" +*PaperDimension A2/A2: "1191 1684" *PaperDimension A3/A3: "842 1191" *PaperDimension A4/A4: "595 842" *PaperDimension A5/A5: "421 595"
1
0
0
0
Gijs Vermeulen : ntoskrnl.exe: Improve IoCreateSynchronizationEvent stub.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: 0886484d898b543e9ecbc08e79a0691bd99729a4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0886484d898b543e9ecbc08e…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Sat Apr 7 20:09:59 2018 +0200 ntoskrnl.exe: Improve IoCreateSynchronizationEvent stub. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 96e4ec81ece59853f038447fa15e9b391d5ab996) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 5bea991..f981814 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2608,7 +2608,7 @@ BOOLEAN WINAPI Ke386SetIoAccessMap(ULONG flag, PVOID buffer) PKEVENT WINAPI IoCreateSynchronizationEvent(PUNICODE_STRING name, PHANDLE handle) { FIXME("(%p %p) stub\n", name, handle); - return NULL; + return (KEVENT *)0xdeadbeaf; } /*****************************************************
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
63
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
Results per page:
10
25
50
100
200