ReactOS.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
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
List overview
Download
Ros-diffs
May 2016
----- 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
ros-diffs@reactos.org
18 participants
260 discussions
Start a n
N
ew thread
[dquintana] 71399: [KERNEL32] * Return TRUE from SetThreadStackGuarantee. Allows .NET 2.0 setup to complete and consequently allows some .net apps to work in ReactOS. Patch by the self-proclaimed M...
by dquintana@svn.reactos.org
Author: dquintana Date: Wed May 25 14:47:02 2016 New Revision: 71399 URL:
http://svn.reactos.org/svn/reactos?rev=71399&view=rev
Log: [KERNEL32] * Return TRUE from SetThreadStackGuarantee. Allows .NET 2.0 setup to complete and consequently allows some .net apps to work in ReactOS. Patch by the self-proclaimed Master of The Universe, Samuel Serapión. Modified: trunk/reactos/dll/win32/kernel32/client/thread.c Modified: trunk/reactos/dll/win32/kernel32/client/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/thread.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/thread.c [iso-8859-1] Wed May 25 14:47:02 2016 @@ -978,8 +978,10 @@ WINAPI SetThreadStackGuarantee(IN OUT PULONG StackSizeInBytes) { - UNIMPLEMENTED; - return FALSE; + static int once; + if (once++ == 0) + DPRINT1("SetThreadStackGuarantee(%p): stub\n", StackSizeInBytes); + return TRUE; } /*
8 years, 7 months
1
0
0
0
[tfaber] 71398: [NTOS:EX] - Use the calling thread instead of the passed-in thread to validate APC status in ExReleaseResourceForThreadLite. The latter can be user-set and might not be a KTHREAD at...
by tfaber@svn.reactos.org
Author: tfaber Date: Wed May 25 10:27:17 2016 New Revision: 71398 URL:
http://svn.reactos.org/svn/reactos?rev=71398&view=rev
Log: [NTOS:EX] - Use the calling thread instead of the passed-in thread to validate APC status in ExReleaseResourceForThreadLite. The latter can be user-set and might not be a KTHREAD at all. CORE-11315 #resolve Modified: trunk/reactos/ntoskrnl/ex/resource.c trunk/rostests/kmtests/ntos_ex/ExResource.c Modified: trunk/reactos/ntoskrnl/ex/resource.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/resource.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] Wed May 25 10:27:17 2016 @@ -1817,7 +1817,7 @@ ExReleaseResourceLite(IN PERESOURCE Resource) { /* Just call the For-Thread function */ - ExReleaseResourceForThreadLite(Resource, (ERESOURCE_THREAD)PsGetCurrentThread()); + ExReleaseResourceForThreadLite(Resource, ExGetCurrentResourceThread()); } /*++ @@ -1855,7 +1855,7 @@ /* Sanity checks */ ExpVerifyResource(Resource); - ExpCheckForApcsDisabled(LockHandle.OldIrql, Resource, (PKTHREAD)Thread); + ExpCheckForApcsDisabled(LockHandle.OldIrql, Resource, KeGetCurrentThread()); /* Check if it's exclusively owned */ if (IsOwnedExclusive(Resource)) Modified: trunk/rostests/kmtests/ntos_ex/ExResource.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ex/ExResourc…
============================================================================== --- trunk/rostests/kmtests/ntos_ex/ExResource.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_ex/ExResource.c [iso-8859-1] Wed May 25 10:27:17 2016 @@ -505,6 +505,10 @@ KeEnterCriticalRegion(); ok_bool_true(ExAcquireResourceExclusiveLite(Res, FALSE), "ExAcquireResourceExclusiveLite returned"); + ExSetResourceOwnerPointer(Res, (PVOID)(ULONG_PTR)3); + ExReleaseResourceForThreadLite(Res, 3); + + ok_bool_true(ExAcquireResourceExclusiveLite(Res, FALSE), "ExAcquireResourceExclusiveLite returned"); ExSetResourceOwnerPointer(Res, (PVOID)((ULONG_PTR)Res | 3)); KeLeaveCriticalRegion();
8 years, 7 months
1
0
0
0
[hbelusca] 71397: [NTDLL] Add exports for RtlOemStringToUnicodeSize, RtlUnicodeStringToAnsiSize and RtlUnicodeStringToOemSize as redirections to suitable Rtlx*** functions, as done in our ntoskrnl ...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue May 24 19:57:29 2016 New Revision: 71397 URL:
http://svn.reactos.org/svn/reactos?rev=71397&view=rev
Log: [NTDLL] Add exports for RtlOemStringToUnicodeSize, RtlUnicodeStringToAnsiSize and RtlUnicodeStringToOemSize as redirections to suitable Rtlx*** functions, as done in our ntoskrnl (and as on Windows either). This should fix MSYS2 start on ReactOS. CORE-10459 #comment Please retest! Modified: trunk/reactos/dll/ntdll/def/ntdll.spec Modified: trunk/reactos/dll/ntdll/def/ntdll.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.spec?r…
============================================================================== --- trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] Tue May 24 19:57:29 2016 @@ -791,7 +791,7 @@ 786 stdcall RtlNumberGenericTableElementsAvl(ptr) 787 stdcall RtlNumberOfClearBits(ptr) 788 stdcall RtlNumberOfSetBits(ptr) -# stdcall RtlOemStringToUnicodeSize(ptr) +789 stdcall RtlOemStringToUnicodeSize(ptr) RtlxOemStringToUnicodeSize 790 stdcall RtlOemStringToUnicodeString(ptr ptr long) 791 stdcall RtlOemToUnicodeN(ptr long ptr ptr long) 792 stdcall RtlOpenCurrentUser(long ptr) @@ -909,11 +909,11 @@ 903 stdcall RtlTryEnterCriticalSection(ptr) # stdcall RtlUnhandledExceptionFilter2 905 stdcall RtlUnhandledExceptionFilter(ptr) -# stdcall RtlUnicodeStringToAnsiSize(ptr) +906 stdcall RtlUnicodeStringToAnsiSize(ptr) RtlxUnicodeStringToAnsiSize 907 stdcall RtlUnicodeStringToAnsiString(ptr ptr long) 908 stdcall RtlUnicodeStringToCountedOemString(ptr ptr long) 909 stdcall RtlUnicodeStringToInteger(ptr long ptr) -# stdcall RtlUnicodeStringToOemSize(ptr) +910 stdcall RtlUnicodeStringToOemSize(ptr) RtlxUnicodeStringToOemSize 911 stdcall RtlUnicodeStringToOemString(ptr ptr long) 912 stdcall RtlUnicodeToCustomCPN(ptr ptr long ptr wstr long) 913 stdcall RtlUnicodeToMultiByteN(ptr long ptr ptr long) @@ -969,7 +969,7 @@ 961 stdcall RtlxAnsiStringToUnicodeSize(ptr) 962 stdcall RtlxOemStringToUnicodeSize(ptr) 963 stdcall RtlxUnicodeStringToAnsiSize(ptr) -964 stdcall RtlxUnicodeStringToOemSize(ptr) ; RtlUnicodeStringToOemSize +964 stdcall RtlxUnicodeStringToOemSize(ptr) 965 stdcall -ret64 VerSetConditionMask(double long long) 966 stdcall ZwAcceptConnectPort(ptr long ptr long long ptr) NtAcceptConnectPort 967 stdcall ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck
8 years, 7 months
1
0
0
0
[mjansen] 71396: [CRT] Partially sync strtoi64 with Wine Staging 1.9.9. Patch by Samuel Serapión CORE-11174 #resolve #comment Thanks!
by mjansen@svn.reactos.org
Author: mjansen Date: Tue May 24 19:27:57 2016 New Revision: 71396 URL:
http://svn.reactos.org/svn/reactos?rev=71396&view=rev
Log: [CRT] Partially sync strtoi64 with Wine Staging 1.9.9. Patch by Samuel Serapión CORE-11174 #resolve #comment Thanks! Modified: trunk/reactos/media/doc/README.WINE trunk/reactos/sdk/lib/crt/libcntpr.cmake trunk/reactos/sdk/lib/crt/string/strtoi64.c trunk/reactos/sdk/lib/crt/string/strtoul.c Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue May 24 19:27:57 2016 @@ -291,7 +291,8 @@ reactos/lib/sdk/crt/process/_cwait.c # Synced to WineStaging-1.7.37 reactos/lib/sdk/crt/signal/xcptinfo.c # Synced to WineStaging-1.7.37 reactos/lib/sdk/crt/string/scanf.c/h # Synced to Wine-1.7.17 - reactos/lib/sdk/crt/string/strtoul.c # Synced to WineStaging-1.7.37 + reactos/lib/sdk/crt/string/strtoi64.c # Synced to WineStaging-1.9.9 + reactos/lib/sdk/crt/string/strtoul.c # Synced to WineStaging-1.9.9 reactos/lib/sdk/crt/strings/wcs.c # Synced at 20080611 reactos/lib/sdk/crt/wine/heap.c # Synced at 20080529 reactos/lib/sdk/crt/wine/undname.c # Synced to WineStaging-1.7.55 Modified: trunk/reactos/sdk/lib/crt/libcntpr.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/libcntpr.cmake…
============================================================================== --- trunk/reactos/sdk/lib/crt/libcntpr.cmake [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/libcntpr.cmake [iso-8859-1] Tue May 24 19:27:57 2016 @@ -48,6 +48,7 @@ string/itoa.c string/itow.c string/mbstowcs_nt.c + string/strtoi64.c string/strtol.c string/strtoul.c string/strtoull.c Modified: trunk/reactos/sdk/lib/crt/string/strtoi64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/string/strtoi6…
============================================================================== --- trunk/reactos/sdk/lib/crt/string/strtoi64.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/string/strtoi64.c [iso-8859-1] Tue May 24 19:27:57 2016 @@ -1,13 +1,28 @@ #include <precomp.h> +/* Based on Wine Staging 1.9.9 - dlls/msvcrt/string.c */ -__int64 -_strtoi64(const char *nptr, char **endptr, int base) +/********************************************************************* +* _strtoi64_l (MSVCRT.@) +* +* FIXME: locale parameter is ignored +*/ +__int64 CDECL strtoi64_l(const char *nptr, char **endptr, int base, _locale_t locale) { + const char *p = nptr; BOOL negative = FALSE; + BOOL got_digit = FALSE; __int64 ret = 0; - while(isspace((unsigned char)*nptr)) nptr++; +#ifndef _LIBCNT_ + TRACE("(%s %p %d %p)\n", debugstr_a(nptr), endptr, base, locale); +#endif + + if (!MSVCRT_CHECK_PMT(nptr != NULL)) return 0; + if (!MSVCRT_CHECK_PMT(base == 0 || base >= 2)) return 0; + if (!MSVCRT_CHECK_PMT(base <= 36)) return 0; + + while (isspace(*nptr)) nptr++; if(*nptr == '-') { negative = TRUE; @@ -31,7 +46,7 @@ char cur = tolower(*nptr); int v; - if(isdigit((unsigned char)cur)) { + if(isdigit(cur)) { if(cur >= '0'+base) break; v = cur-'0'; @@ -40,6 +55,7 @@ break; v = cur-'a'+10; } + got_digit = TRUE; if(negative) v = -v; @@ -48,19 +64,31 @@ if(!negative && (ret>_I64_MAX/base || ret*base>_I64_MAX-v)) { ret = _I64_MAX; +#ifndef _LIBCNT_ *_errno() = ERANGE; - } else if(negative && (ret<_I64_MIN/base || ret*base<_I64_MIN-v)) { +#endif + } + else if (negative && (ret<_I64_MIN / base || ret*base<_I64_MIN - v)) { ret = _I64_MIN; +#ifndef _LIBCNT_ *_errno() = ERANGE; - } else +#endif + } + else ret = ret*base + v; } if(endptr) - *endptr = (char*)nptr; + *endptr = (char*)(got_digit ? nptr : p); return ret; } +__int64 +_strtoi64(const char *nptr, char **endptr, int base) +{ + return strtoi64_l(nptr, endptr, base, NULL); +} + /* EOF */ Modified: trunk/reactos/sdk/lib/crt/string/strtoul.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/string/strtoul…
============================================================================== --- trunk/reactos/sdk/lib/crt/string/strtoul.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/string/strtoul.c [iso-8859-1] Tue May 24 19:27:57 2016 @@ -1,83 +1,7 @@ #include <precomp.h> -/* Based on Wine Staging 1.7.37 - dlls/msvcrt/string.c */ - -/********************************************************************* - * _strtoi64_l (MSVCRT.@) - * - * FIXME: locale parameter is ignored - */ -__int64 CDECL strtoi64_l(const char *nptr, char **endptr, int base, _locale_t locale) -{ - BOOL negative = FALSE; - __int64 ret = 0; - -#ifndef _LIBCNT_ - TRACE("(%s %p %d %p)\n", debugstr_a(nptr), endptr, base, locale); -#endif - - if (!MSVCRT_CHECK_PMT(nptr != NULL)) return 0; - if (!MSVCRT_CHECK_PMT(base == 0 || base >= 2)) return 0; - if (!MSVCRT_CHECK_PMT(base <= 36)) return 0; - - while(isspace(*nptr)) nptr++; - - if(*nptr == '-') { - negative = TRUE; - nptr++; - } else if(*nptr == '+') - nptr++; - - if((base==0 || base==16) && *nptr=='0' && tolower(*(nptr+1))=='x') { - base = 16; - nptr += 2; - } - - if(base == 0) { - if(*nptr=='0') - base = 8; - else - base = 10; - } - - while(*nptr) { - char cur = tolower(*nptr); - int v; - - if(isdigit(cur)) { - if(cur >= '0'+base) - break; - v = cur-'0'; - } else { - if(cur<'a' || cur>='a'+base-10) - break; - v = cur-'a'+10; - } - - if(negative) - v = -v; - - nptr++; - - if(!negative && (ret>_I64_MAX/base || ret*base>_I64_MAX-v)) { - ret = _I64_MAX; -#ifndef _LIBCNT_ - *_errno() = ERANGE; -#endif - } else if(negative && (ret<_I64_MIN/base || ret*base<_I64_MIN-v)) { - ret = _I64_MIN; -#ifndef _LIBCNT_ - *_errno() = ERANGE; -#endif - } else - ret = ret*base + v; - } - - if(endptr) - *endptr = (char*)nptr; - - return ret; -} +/* Based on Wine Staging 1.9.9 - dlls/msvcrt/string.c */ +__int64 CDECL strtoi64_l(const char *nptr, char **endptr, int base, _locale_t locale); /****************************************************************** * _strtoul_l (MSVCRT.@)
8 years, 7 months
1
0
0
0
[pschweitzer] 71395: [KMTESTS] Add test for ExSetResourceOwnerPointer() and ExReleaseResourceForThreadLite() CORE-11310
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue May 24 08:13:17 2016 New Revision: 71395 URL:
http://svn.reactos.org/svn/reactos?rev=71395&view=rev
Log: [KMTESTS] Add test for ExSetResourceOwnerPointer() and ExReleaseResourceForThreadLite() CORE-11310 Modified: trunk/rostests/kmtests/ntos_ex/ExResource.c Modified: trunk/rostests/kmtests/ntos_ex/ExResource.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ex/ExResourc…
============================================================================== --- trunk/rostests/kmtests/ntos_ex/ExResource.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_ex/ExResource.c [iso-8859-1] Tue May 24 08:13:17 2016 @@ -272,6 +272,7 @@ PACQUIRE_FUNCTION AcquireResource; BOOLEAN Wait; BOOLEAN RetExpected; + PKSTART_ROUTINE StartRoutine; } THREAD_DATA, *PTHREAD_DATA; static @@ -302,15 +303,27 @@ static VOID +InitThreadDataEx( + PTHREAD_DATA ThreadData, + PERESOURCE Res, + PACQUIRE_FUNCTION AcquireFunction, + PKSTART_ROUTINE StartRoutine) +{ + ThreadData->Res = Res; + KeInitializeEvent(&ThreadData->InEvent, NotificationEvent, FALSE); + KeInitializeEvent(&ThreadData->OutEvent, NotificationEvent, FALSE); + ThreadData->AcquireResource = AcquireFunction; + ThreadData->StartRoutine = StartRoutine; +} + +static +VOID InitThreadData( PTHREAD_DATA ThreadData, PERESOURCE Res, PACQUIRE_FUNCTION AcquireFunction) { - ThreadData->Res = Res; - KeInitializeEvent(&ThreadData->InEvent, NotificationEvent, FALSE); - KeInitializeEvent(&ThreadData->OutEvent, NotificationEvent, FALSE); - ThreadData->AcquireResource = AcquireFunction; + InitThreadDataEx(ThreadData, Res, AcquireFunction, AcquireResourceThread); } static @@ -327,7 +340,7 @@ ThreadData->Wait = Wait; ThreadData->RetExpected = RetExpected; InitializeObjectAttributes(&Attributes, NULL, OBJ_KERNEL_HANDLE, NULL, NULL); - Status = PsCreateSystemThread(&ThreadData->Handle, GENERIC_ALL, &Attributes, NULL, NULL, AcquireResourceThread, ThreadData); + Status = PsCreateSystemThread(&ThreadData->Handle, GENERIC_ALL, &Attributes, NULL, NULL, ThreadData->StartRoutine, ThreadData); ok_eq_hex(Status, STATUS_SUCCESS); Status = ObReferenceObjectByHandle(ThreadData->Handle, SYNCHRONIZE, *PsThreadType, KernelMode, (PVOID *)&ThreadData->Thread, NULL); ok_eq_hex(Status, STATUS_SUCCESS); @@ -455,6 +468,52 @@ ok_eq_int(Res->ActiveCount, 0); } +static +VOID +NTAPI +TestOwnerRes( + PVOID Context) +{ + NTSTATUS Status = STATUS_SUCCESS; + PTHREAD_DATA ThreadData = Context; + BOOLEAN Ret; + + KeEnterCriticalRegion(); + Ret = ThreadData->AcquireResource(ThreadData->Res, ThreadData->Wait); + if (ThreadData->RetExpected) + ok_bool_true(Ret, "AcquireResource returned"); + else + ok_bool_false(Ret, "AcquireResource returned"); + KeLeaveCriticalRegion(); + + ExReleaseResourceForThreadLite(ThreadData->Res, (ULONG_PTR)ThreadData->Res | 3); + + ok_bool_false(KeSetEvent(&ThreadData->OutEvent, 0, TRUE), "KeSetEvent returned"); + Status = KeWaitForSingleObject(&ThreadData->InEvent, Executive, KernelMode, FALSE, NULL); + ok_eq_hex(Status, STATUS_SUCCESS); +} + +static +VOID +TestResourceWithOwner( + IN PERESOURCE Res) +{ + NTSTATUS Status; + THREAD_DATA ThreadDataOwner; + + InitThreadDataEx(&ThreadDataOwner, Res, ExAcquireResourceExclusiveLite, TestOwnerRes); + + KeEnterCriticalRegion(); + ok_bool_true(ExAcquireResourceExclusiveLite(Res, FALSE), "ExAcquireResourceExclusiveLite returned"); + ExSetResourceOwnerPointer(Res, (PVOID)((ULONG_PTR)Res | 3)); + KeLeaveCriticalRegion(); + + Status = StartThread(&ThreadDataOwner, NULL, FALSE, FALSE); + ok_eq_hex(Status, STATUS_SUCCESS); + + FinishThread(&ThreadDataOwner); +} + START_TEST(ExResource) { NTSTATUS Status; @@ -512,6 +571,9 @@ Status = ExReinitializeResourceLite(&Res); ok_eq_hex(Status, STATUS_SUCCESS); CheckResourceFields((PERESOURCE_2K3)&Res, TRUE); + CheckResourceStatus(&Res, FALSE, 0LU, 0LU, 0LU); + + TestResourceWithOwner(&Res); CheckResourceStatus(&Res, FALSE, 0LU, 0LU, 0LU); Status = ExDeleteResourceLite(&Res);
8 years, 7 months
1
0
0
0
[ekohl] 71394: [SERVICES] - RChangeServiceConfigA/W: Modify or delete password secrets. [ADVAPI32] - ChangeServiceConfigA, CreateServiceA: Convert passwords to Unicode before passing them to the re...
by ekohl@svn.reactos.org
Author: ekohl Date: Mon May 23 21:48:32 2016 New Revision: 71394 URL:
http://svn.reactos.org/svn/reactos?rev=71394&view=rev
Log: [SERVICES] - RChangeServiceConfigA/W: Modify or delete password secrets. [ADVAPI32] - ChangeServiceConfigA, CreateServiceA: Convert passwords to Unicode before passing them to the remote functions. Modified: trunk/reactos/base/system/services/config.c trunk/reactos/base/system/services/rpcserver.c trunk/reactos/dll/win32/advapi32/service/scm.c Modified: trunk/reactos/base/system/services/config.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/confi…
============================================================================== --- trunk/reactos/base/system/services/config.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/config.c [iso-8859-1] Mon May 23 21:48:32 2016 @@ -481,7 +481,7 @@ Status = LsaStorePrivateData(PolicyHandle, &ServiceName, - &Password); + pszPassword ? &Password : NULL); if (!NT_SUCCESS(Status)) { dwError = RtlNtStatusToDosError(Status); Modified: trunk/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
============================================================================== --- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Mon May 23 21:48:32 2016 @@ -2022,7 +2022,27 @@ if (lpPassword != NULL) { - /* FIXME: Decrypt and write password */ + if (wcslen((LPWSTR)lpPassword) != 0) + { + /* FIXME: Decrypt the password */ + + /* Write the password */ + dwError = ScmSetServicePassword(lpService->szServiceName, + (LPCWSTR)lpPassword); + if (dwError != ERROR_SUCCESS) + goto done; + } + else + { + /* Delete the password */ + dwError = ScmSetServicePassword(lpService->szServiceName, + NULL); + if (dwError == ERROR_FILE_NOT_FOUND) + dwError = ERROR_SUCCESS; + + if (dwError != ERROR_SUCCESS) + goto done; + } } done: @@ -3460,11 +3480,34 @@ dwDependSize); HeapFree(GetProcessHeap(), 0, lpDependenciesW); + + if (dwError != ERROR_SUCCESS) + goto done; } if (lpPassword != NULL) { - /* FIXME: Decrypt and write password */ + if (wcslen((LPWSTR)lpPassword) != 0) + { + /* FIXME: Decrypt the password */ + + /* Write the password */ + dwError = ScmSetServicePassword(lpService->szServiceName, + (LPCWSTR)lpPassword); + if (dwError != ERROR_SUCCESS) + goto done; + } + else + { + /* Delete the password */ + dwError = ScmSetServicePassword(lpService->szServiceName, + NULL); + if (dwError == ERROR_FILE_NOT_FOUND) + dwError = ERROR_SUCCESS; + + if (dwError != ERROR_SUCCESS) + goto done; + } } done: Modified: trunk/reactos/dll/win32/advapi32/service/scm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
============================================================================== --- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Mon May 23 21:48:32 2016 @@ -287,6 +287,7 @@ SIZE_T cchLength; LPCSTR lpStr; DWORD dwPasswordLength = 0; + LPWSTR lpPasswordW = NULL; LPBYTE lpEncryptedPassword = NULL; TRACE("ChangeServiceConfigA() called\n"); @@ -304,9 +305,29 @@ dwDependenciesLength++; } - /* FIXME: Encrypt the password */ - lpEncryptedPassword = (LPBYTE)lpPassword; - dwPasswordLength = (DWORD)(lpPassword ? (strlen(lpPassword) + 1) * sizeof(CHAR) : 0); + if (lpPassword != NULL) + { + /* Convert the password to unicode */ + lpPasswordW = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + (strlen(lpPassword) + 1) * sizeof(WCHAR)); + if (lpPasswordW == NULL) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + MultiByteToWideChar(CP_ACP, + 0, + lpPassword, + -1, + lpPasswordW, + (int)(strlen(lpPassword) + 1)); + + /* FIXME: Encrypt the password */ + lpEncryptedPassword = (LPBYTE)lpPasswordW; + dwPasswordLength = (DWORD)(lpPasswordW ? (wcslen(lpPasswordW) + 1) * sizeof(WCHAR) : 0); + } RpcTryExcept { @@ -331,6 +352,9 @@ } RpcEndExcept; + if (lpPasswordW != NULL) + HeapFree(GetProcessHeap(), 0, lpPasswordW); + if (dwError != ERROR_SUCCESS) { TRACE("RChangeServiceConfigA() failed (Error %lu)\n", dwError); @@ -548,6 +572,7 @@ SIZE_T cchLength; LPCSTR lpStr; DWORD dwPasswordLength = 0; + LPWSTR lpPasswordW = NULL; LPBYTE lpEncryptedPassword = NULL; TRACE("CreateServiceA() called\n"); @@ -573,9 +598,29 @@ dwDependenciesLength++; } - /* FIXME: Encrypt the password */ - lpEncryptedPassword = (LPBYTE)lpPassword; - dwPasswordLength = (DWORD)(lpPassword ? (strlen(lpPassword) + 1) * sizeof(CHAR) : 0); + if (lpPassword != NULL) + { + /* Convert the password to unicode */ + lpPasswordW = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + (strlen(lpPassword) + 1) * sizeof(WCHAR)); + if (lpPasswordW == NULL) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + MultiByteToWideChar(CP_ACP, + 0, + lpPassword, + -1, + lpPasswordW, + (int)(strlen(lpPassword) + 1)); + + /* FIXME: Encrypt the password */ + lpEncryptedPassword = (LPBYTE)lpPasswordW; + dwPasswordLength = (DWORD)(lpPasswordW ? (wcslen(lpPasswordW) + 1) * sizeof(WCHAR) : 0); + } RpcTryExcept { @@ -602,6 +647,9 @@ dwError = ScmRpcStatusToWinError(RpcExceptionCode()); } RpcEndExcept; + + if (lpPasswordW != NULL) + HeapFree(GetProcessHeap(), 0, lpPasswordW); if (dwError != ERROR_SUCCESS) {
8 years, 7 months
1
0
0
0
[pschweitzer] 71393: [NTOSKRNL] Fix misleading comment
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon May 23 21:14:49 2016 New Revision: 71393 URL:
http://svn.reactos.org/svn/reactos?rev=71393&view=rev
Log: [NTOSKRNL] Fix misleading comment Modified: trunk/reactos/ntoskrnl/ex/resource.c Modified: trunk/reactos/ntoskrnl/ex/resource.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/resource.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] Mon May 23 21:14:49 2016 @@ -141,7 +141,7 @@ !(Thread->CombinedApcDisable)) { /* Bad! */ - DPRINT1("EX: resource: APCs still enabled before resource %p acquire " + DPRINT1("EX: resource: APCs still enabled before resource %p acquire/release " "!!!\n", Resource); DbgBreakPoint(); }
8 years, 7 months
1
0
0
0
[jgardou] 71392: [CDFS_NEW] - The usual second forgotten file
by jgardou@svn.reactos.org
Author: jgardou Date: Mon May 23 20:35:33 2016 New Revision: 71392 URL:
http://svn.reactos.org/svn/reactos?rev=71392&view=rev
Log: [CDFS_NEW] - The usual second forgotten file Added: branches/TransitionPte/drivers/filesystems/cdfs_new/cdfs_reg.inf (with props) Added: branches/TransitionPte/drivers/filesystems/cdfs_new/cdfs_reg.inf URL:
http://svn.reactos.org/svn/reactos/branches/TransitionPte/drivers/filesyste…
============================================================================== --- branches/TransitionPte/drivers/filesystems/cdfs_new/cdfs_reg.inf (added) +++ branches/TransitionPte/drivers/filesystems/cdfs_new/cdfs_reg.inf [iso-8859-1] Mon May 23 20:35:33 2016 @@ -0,0 +1,7 @@ +; Cdfs (ISO96660) filesystem driver +[AddReg] +HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","ErrorControl",0x00010001,0x00000000 +HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","Group",0x00000000,"File System" +HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","ImagePath",0x00020000,"system32\drivers\cdfs.sys" +HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","Start",0x00010001,0x00000003 +HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","Type",0x00010001,0x00000002 Propchange: branches/TransitionPte/drivers/filesystems/cdfs_new/cdfs_reg.inf ------------------------------------------------------------------------------ svn:eol-style = native
8 years, 7 months
1
0
0
0
[jgardou] 71391: [NTOS/MM] - Implement MmProbeAndLockProcessPages
by jgardou@svn.reactos.org
Author: jgardou Date: Mon May 23 20:33:03 2016 New Revision: 71391 URL:
http://svn.reactos.org/svn/reactos?rev=71391&view=rev
Log: [NTOS/MM] - Implement MmProbeAndLockProcessPages Modified: branches/TransitionPte/ntoskrnl/mm/ARM3/mdlsup.c Modified: branches/TransitionPte/ntoskrnl/mm/ARM3/mdlsup.c URL:
http://svn.reactos.org/svn/reactos/branches/TransitionPte/ntoskrnl/mm/ARM3/…
============================================================================== --- branches/TransitionPte/ntoskrnl/mm/ARM3/mdlsup.c [iso-8859-1] (original) +++ branches/TransitionPte/ntoskrnl/mm/ARM3/mdlsup.c [iso-8859-1] Mon May 23 20:33:03 2016 @@ -1326,16 +1326,56 @@ } /* - * @unimplemented + * @implemented */ VOID NTAPI -MmProbeAndLockProcessPages(IN OUT PMDL MemoryDescriptorList, +MmProbeAndLockProcessPages(IN OUT PMDL Mdl, IN PEPROCESS Process, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation) { - UNIMPLEMENTED; + PVOID Address; + NTSTATUS Status = STATUS_SUCCESS; + + BOOLEAN Attach; + KAPC_STATE ApcState; + + DPRINT("Probing MDL: %p for process %p\n", Mdl, Process); + // + // Get address information, to see if we really need to attach + // + Address = (PVOID)((ULONG_PTR)Mdl->StartVa + Mdl->ByteOffset); + + Attach = ((Process != PsGetCurrentProcess()) && (Address <= (PVOID)MM_USER_PROBE_ADDRESS)); + if (Attach) + { + KeStackAttachProcess(&Process->Pcb, &ApcState); + } + + _SEH2_TRY + { + MmProbeAndLockPages(Mdl, AccessMode, Operation); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + // + // Oops :( + // + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + + if (Attach) + { + KeUnstackDetachProcess(&ApcState); + } + + if (!NT_SUCCESS(Status)) + { + /* If the operation failed while we were attached, forward it to the caller */ + ExRaiseStatus(Status); + } }
8 years, 7 months
1
0
0
0
[jgardou] 71390: [CDFS_NEW] - The usual forgotten file
by jgardou@svn.reactos.org
Author: jgardou Date: Mon May 23 20:18:20 2016 New Revision: 71390 URL:
http://svn.reactos.org/svn/reactos?rev=71390&view=rev
Log: [CDFS_NEW] - The usual forgotten file Added: branches/TransitionPte/drivers/filesystems/cdfs_new/CMakeLists.txt (with props) Added: branches/TransitionPte/drivers/filesystems/cdfs_new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/TransitionPte/drivers/filesyste…
============================================================================== --- branches/TransitionPte/drivers/filesystems/cdfs_new/CMakeLists.txt (added) +++ branches/TransitionPte/drivers/filesystems/cdfs_new/CMakeLists.txt [iso-8859-1] Mon May 23 20:18:20 2016 @@ -0,0 +1,40 @@ + +# include_directories(${REACTOS_SOURCE_DIR}/include/reactos/drivers) + +list(APPEND SOURCE + allocsup.c + cachesup.c + cddata.c + cdinit.c + cleanup.c + close.c + create.c + devctrl.c + deviosup.c + dirctrl.c + dirsup.c +# fieldoff.c #useless + fileinfo.c + filobsup.c + fsctrl.c + fspdisp.c + lockctrl.c + namesup.c + pathsup.c + pnp.c + prefxsup.c + read.c + resrcsup.c + strucsup.c + verfysup.c + volinfo.c + workque.c + cdprocs.h) + +add_library(cdfs SHARED ${SOURCE} cdfs.rc) +set_module_type(cdfs kernelmodedriver) +target_link_libraries(cdfs memcmp ${PSEH_LIB}) +add_importlibs(cdfs ntoskrnl hal) +add_pch(cdfs cdprocs.h SOURCE) +add_cd_file(TARGET cdfs DESTINATION reactos/system32/drivers NO_CAB FOR all) +add_registry_inf(cdfs_reg.inf) Propchange: branches/TransitionPte/drivers/filesystems/cdfs_new/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native
8 years, 7 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
26
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
Results per page:
10
25
50
100
200