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
July 2014
----- 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
9 participants
111 discussions
Start a n
N
ew thread
[dreimer] 63781: [GAMES] Add some borders in Spider and Solitaire around the location the cards will be drawn in. Now cards don't touch the frame anymore. Increase the size of the card background p...
by dreimer@svn.reactos.org
Author: dreimer Date: Wed Jul 30 11:41:45 2014 New Revision: 63781 URL:
http://svn.reactos.org/svn/reactos?rev=63781&view=rev
Log: [GAMES] Add some borders in Spider and Solitaire around the location the cards will be drawn in. Now cards don't touch the frame anymore. Increase the size of the card background previews. Now you will even see some details of them. Increase the selection dialog size accordingly. Modified: trunk/reactos/base/applications/games/solitaire/lang/bg-BG.rc trunk/reactos/base/applications/games/solitaire/lang/ca-ES.rc trunk/reactos/base/applications/games/solitaire/lang/cs-CZ.rc trunk/reactos/base/applications/games/solitaire/lang/de-DE.rc trunk/reactos/base/applications/games/solitaire/lang/el-GR.rc trunk/reactos/base/applications/games/solitaire/lang/en-US.rc trunk/reactos/base/applications/games/solitaire/lang/es-ES.rc trunk/reactos/base/applications/games/solitaire/lang/eu-ES.rc trunk/reactos/base/applications/games/solitaire/lang/fr-FR.rc trunk/reactos/base/applications/games/solitaire/lang/he-IL.rc trunk/reactos/base/applications/games/solitaire/lang/hu-HU.rc trunk/reactos/base/applications/games/solitaire/lang/id-ID.rc trunk/reactos/base/applications/games/solitaire/lang/it-IT.rc trunk/reactos/base/applications/games/solitaire/lang/ja-JP.rc trunk/reactos/base/applications/games/solitaire/lang/ko-KR.rc trunk/reactos/base/applications/games/solitaire/lang/lt-LT.rc trunk/reactos/base/applications/games/solitaire/lang/nl-NL.rc trunk/reactos/base/applications/games/solitaire/lang/no-NO.rc trunk/reactos/base/applications/games/solitaire/lang/pl-PL.rc trunk/reactos/base/applications/games/solitaire/lang/ro-RO.rc trunk/reactos/base/applications/games/solitaire/lang/ru-RU.rc trunk/reactos/base/applications/games/solitaire/lang/sk-SK.rc trunk/reactos/base/applications/games/solitaire/lang/sq-AL.rc trunk/reactos/base/applications/games/solitaire/lang/sv-SE.rc trunk/reactos/base/applications/games/solitaire/lang/th-TH.rc trunk/reactos/base/applications/games/solitaire/lang/tr-TR.rc trunk/reactos/base/applications/games/solitaire/lang/uk-UA.rc trunk/reactos/base/applications/games/solitaire/lang/zh-CN.rc trunk/reactos/base/applications/games/solitaire/lang/zh-TW.rc trunk/reactos/base/applications/games/solitaire/solitaire.h trunk/reactos/base/applications/games/spider/lang/bg-BG.rc trunk/reactos/base/applications/games/spider/lang/de-DE.rc trunk/reactos/base/applications/games/spider/lang/en-US.rc trunk/reactos/base/applications/games/spider/lang/es-ES.rc trunk/reactos/base/applications/games/spider/lang/fr-FR.rc trunk/reactos/base/applications/games/spider/lang/he-IL.rc trunk/reactos/base/applications/games/spider/lang/hu-HU.rc trunk/reactos/base/applications/games/spider/lang/it-IT.rc trunk/reactos/base/applications/games/spider/lang/ja-JP.rc trunk/reactos/base/applications/games/spider/lang/nl-NL.rc trunk/reactos/base/applications/games/spider/lang/pl-PL.rc trunk/reactos/base/applications/games/spider/lang/pt-BR.rc trunk/reactos/base/applications/games/spider/lang/ro-RO.rc trunk/reactos/base/applications/games/spider/lang/ru-RU.rc trunk/reactos/base/applications/games/spider/lang/sk-SK.rc trunk/reactos/base/applications/games/spider/lang/sq-AL.rc trunk/reactos/base/applications/games/spider/lang/sv-SE.rc trunk/reactos/base/applications/games/spider/lang/tr-TR.rc trunk/reactos/base/applications/games/spider/lang/uk-UA.rc trunk/reactos/base/applications/games/spider/lang/zh-CN.rc trunk/reactos/base/applications/games/spider/lang/zh-TW.rc trunk/reactos/base/applications/games/spider/spider.cpp trunk/reactos/base/applications/games/spider/spider.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/base/applications/games/solitaire/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/ca-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/eu-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/he-IL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/ko-KR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/lt-LT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/th-TH.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/lang/zh-TW.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/solitaire/solitaire.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/so…
Modified: trunk/reactos/base/applications/games/spider/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/he-IL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/lang/zh-TW.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/spider.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
Modified: trunk/reactos/base/applications/games/spider/spider.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/sp…
10 years, 4 months
1
0
0
0
[tfaber] 63780: [OLE32] - Stub CoGetStdMarshalEx, needed by Google Updater CORE-8385
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Jul 30 10:21:16 2014 New Revision: 63780 URL:
http://svn.reactos.org/svn/reactos?rev=63780&view=rev
Log: [OLE32] - Stub CoGetStdMarshalEx, needed by Google Updater CORE-8385 Modified: trunk/reactos/dll/win32/ole32/ole32.spec Modified: trunk/reactos/dll/win32/ole32/ole32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32.spec…
============================================================================== --- trunk/reactos/dll/win32/ole32/ole32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ole32.spec [iso-8859-1] Wed Jul 30 10:21:16 2014 @@ -57,7 +57,7 @@ # CoGetProcessIdentifier @ stdcall CoGetStandardMarshal(ptr ptr long ptr long ptr) @ stdcall CoGetState(ptr) -# CoGetStdMarshalEx +@ stdcall -stub CoGetStdMarshalEx(ptr long ptr) # CoGetSystemSecurityPermissions @ stdcall CoGetTreatAsClass(ptr ptr) @ stdcall CoImpersonateClient()
10 years, 4 months
1
0
0
0
[tfaber] 63779: [NTOS:CM] - Improve the hack from r63777 to return an allow-Everyone DACL. Fixes crash in advapi32:security. CORE-8383 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Jul 30 10:08:30 2014 New Revision: 63779 URL:
http://svn.reactos.org/svn/reactos?rev=63779&view=rev
Log: [NTOS:CM] - Improve the hack from r63777 to return an allow-Everyone DACL. Fixes crash in advapi32:security. CORE-8383 #resolve Modified: trunk/reactos/ntoskrnl/config/cmse.c Modified: trunk/reactos/ntoskrnl/config/cmse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmse.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmse.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmse.c [iso-8859-1] Wed Jul 30 10:08:30 2014 @@ -144,10 +144,14 @@ IN OUT PULONG BufferLength) { PISECURITY_DESCRIPTOR_RELATIVE RelSd; - PUCHAR Current; ULONG SidSize; + ULONG AclSize; ULONG SdSize; NTSTATUS Status; + SECURITY_DESCRIPTOR_CONTROL Control = 0; + ULONG Owner = 0; + ULONG Group = 0; + ULONG Dacl = 0; DBG_UNREFERENCED_PARAMETER(KeyBody); @@ -157,8 +161,33 @@ } SidSize = RtlLengthSid(SeWorldSid); - SdSize = sizeof(*RelSd) + 2 * SidSize; RelSd = SecurityDescriptor; + SdSize = sizeof(*RelSd); + + if (SecurityInformation & OWNER_SECURITY_INFORMATION) + { + Owner = SdSize; + SdSize += SidSize; + } + + if (SecurityInformation & GROUP_SECURITY_INFORMATION) + { + Group = SdSize; + SdSize += SidSize; + } + + if (SecurityInformation & DACL_SECURITY_INFORMATION) + { + Control |= SE_DACL_PRESENT; + Dacl = SdSize; + AclSize = sizeof(ACL) + sizeof(ACE) + SidSize; + SdSize += AclSize; + } + + if (SecurityInformation & SACL_SECURITY_INFORMATION) + { + Control |= SE_SACL_PRESENT; + } if (*BufferLength < SdSize) { @@ -173,36 +202,37 @@ if (!NT_SUCCESS(Status)) return Status; - Current = (PUCHAR)(RelSd + 1); - ASSERT((ULONG_PTR)Current - (ULONG_PTR)RelSd <= SdSize); - - if (SecurityInformation & OWNER_SECURITY_INFORMATION) - { - RtlCopyMemory(Current, SeWorldSid, SidSize); - RelSd->Owner = Current - (PUCHAR)RelSd; - Current += SidSize; - ASSERT((ULONG_PTR)Current - (ULONG_PTR)RelSd <= SdSize); - } - - if (SecurityInformation & GROUP_SECURITY_INFORMATION) - { - RtlCopyMemory(Current, SeWorldSid, SidSize); - RelSd->Group = Current - (PUCHAR)RelSd; - Current += SidSize; - ASSERT((ULONG_PTR)Current - (ULONG_PTR)RelSd <= SdSize); - } - - if (SecurityInformation & DACL_SECURITY_INFORMATION) - { - RelSd->Control |= SE_DACL_PRESENT; - } - - if (SecurityInformation & SACL_SECURITY_INFORMATION) - { - RelSd->Control |= SE_SACL_PRESENT; - } - - return STATUS_SUCCESS; + RelSd->Control |= Control; + RelSd->Owner = Owner; + RelSd->Group = Group; + RelSd->Dacl = Dacl; + + if (Owner) + RtlCopyMemory((PUCHAR)RelSd + Owner, + SeWorldSid, + SidSize); + + if (Group) + RtlCopyMemory((PUCHAR)RelSd + Group, + SeWorldSid, + SidSize); + + if (Dacl) + { + Status = RtlCreateAcl((PACL)((PUCHAR)RelSd + Dacl), + AclSize, + ACL_REVISION); + if (NT_SUCCESS(Status)) + { + Status = RtlAddAccessAllowedAce((PACL)((PUCHAR)RelSd + Dacl), + ACL_REVISION, + GENERIC_ALL, + SeWorldSid); + } + } + + ASSERT(Status == STATUS_SUCCESS); + return Status; } NTSTATUS
10 years, 4 months
1
0
0
0
[tfaber] 63778: [KS] - Use correct buffer size in KspStartBusDevice. Spotted by Víctor Martínez - Avoid wcscpy in kernel mode while we're at it
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Jul 30 07:50:28 2014 New Revision: 63778 URL:
http://svn.reactos.org/svn/reactos?rev=63778&view=rev
Log: [KS] - Use correct buffer size in KspStartBusDevice. Spotted by Víctor Martínez - Avoid wcscpy in kernel mode while we're at it Modified: trunk/reactos/drivers/ksfilter/ks/precomp.h trunk/reactos/drivers/ksfilter/ks/swenum.c Modified: trunk/reactos/drivers/ksfilter/ks/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/precom…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/precomp.h [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/precomp.h [iso-8859-1] Wed Jul 30 07:50:28 2014 @@ -7,6 +7,7 @@ #include <portcls.h> #include <kcom.h> #include <pseh/pseh2.h> +#include <ntstrsafe.h> #include "ksiface.h" #include "kstypes.h" Modified: trunk/reactos/drivers/ksfilter/ks/swenum.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/swenum…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/swenum.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/swenum.c [iso-8859-1] Wed Jul 30 07:50:28 2014 @@ -757,12 +757,13 @@ NTSTATUS Status; ULONG ResultLength; LPWSTR Name; + ULONG NameLength; PBUS_DEVICE_ENTRY DeviceEntry; /* FIXME handle pending remove */ /* get full device name */ - Status = IoGetDeviceProperty(DeviceObject, DevicePropertyPhysicalDeviceObjectName, sizeof(PDOName), (PVOID)PDOName, &ResultLength); + Status = IoGetDeviceProperty(DeviceObject, DevicePropertyPhysicalDeviceObjectName, sizeof(PDOName), PDOName, &ResultLength); if (!NT_SUCCESS(Status)) { @@ -771,7 +772,8 @@ } /* allocate device name buffer */ - Name = AllocateItem(NonPagedPool, (ResultLength + 1) * sizeof(WCHAR)); + NameLength = ResultLength + sizeof(UNICODE_NULL); + Name = AllocateItem(NonPagedPool, NameLength); if (!Name) { /* no memory */ @@ -779,7 +781,7 @@ } /* copy name */ - wcscpy(Name, PDOName); + NT_VERIFY(NT_SUCCESS(RtlStringCbCopyW(Name, NameLength, PDOName))); /* TODO: time stamp creation time */
10 years, 4 months
1
0
0
0
[tfaber] 63777: [NTOS:CM] - Return a valid security descriptor for keys, even though it's hacked. Based on code removed in r26704. CORE-8382 #resolve #comment Fixed, now we fail with E_FAIL instead...
by tfaber@svn.reactos.org
Author: tfaber Date: Tue Jul 29 22:21:37 2014 New Revision: 63777 URL:
http://svn.reactos.org/svn/reactos?rev=63777&view=rev
Log: [NTOS:CM] - Return a valid security descriptor for keys, even though it's hacked. Based on code removed in r26704. CORE-8382 #resolve #comment Fixed, now we fail with E_FAIL instead. Hurray. Modified: trunk/reactos/ntoskrnl/config/cmse.c Modified: trunk/reactos/ntoskrnl/config/cmse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmse.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmse.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmse.c [iso-8859-1] Tue Jul 29 22:21:37 2014 @@ -138,6 +138,74 @@ } NTSTATUS +CmpQuerySecurityDescriptor(IN PCM_KEY_BODY KeyBody, + IN SECURITY_INFORMATION SecurityInformation, + OUT PSECURITY_DESCRIPTOR SecurityDescriptor, + IN OUT PULONG BufferLength) +{ + PISECURITY_DESCRIPTOR_RELATIVE RelSd; + PUCHAR Current; + ULONG SidSize; + ULONG SdSize; + NTSTATUS Status; + + DBG_UNREFERENCED_PARAMETER(KeyBody); + + if (SecurityInformation == 0) + { + return STATUS_ACCESS_DENIED; + } + + SidSize = RtlLengthSid(SeWorldSid); + SdSize = sizeof(*RelSd) + 2 * SidSize; + RelSd = SecurityDescriptor; + + if (*BufferLength < SdSize) + { + *BufferLength = SdSize; + return STATUS_BUFFER_TOO_SMALL; + } + + *BufferLength = SdSize; + + Status = RtlCreateSecurityDescriptorRelative(RelSd, + SECURITY_DESCRIPTOR_REVISION); + if (!NT_SUCCESS(Status)) + return Status; + + Current = (PUCHAR)(RelSd + 1); + ASSERT((ULONG_PTR)Current - (ULONG_PTR)RelSd <= SdSize); + + if (SecurityInformation & OWNER_SECURITY_INFORMATION) + { + RtlCopyMemory(Current, SeWorldSid, SidSize); + RelSd->Owner = Current - (PUCHAR)RelSd; + Current += SidSize; + ASSERT((ULONG_PTR)Current - (ULONG_PTR)RelSd <= SdSize); + } + + if (SecurityInformation & GROUP_SECURITY_INFORMATION) + { + RtlCopyMemory(Current, SeWorldSid, SidSize); + RelSd->Group = Current - (PUCHAR)RelSd; + Current += SidSize; + ASSERT((ULONG_PTR)Current - (ULONG_PTR)RelSd <= SdSize); + } + + if (SecurityInformation & DACL_SECURITY_INFORMATION) + { + RelSd->Control |= SE_DACL_PRESENT; + } + + if (SecurityInformation & SACL_SECURITY_INFORMATION) + { + RelSd->Control |= SE_SACL_PRESENT; + } + + return STATUS_SUCCESS; +} + +NTSTATUS NTAPI CmpSecurityMethod(IN PVOID ObjectBody, IN SECURITY_OPERATION_CODE OperationCode, @@ -148,6 +216,38 @@ IN POOL_TYPE PoolType, IN PGENERIC_MAPPING GenericMapping) { + DBG_UNREFERENCED_PARAMETER(OldSecurityDescriptor); + DBG_UNREFERENCED_PARAMETER(GenericMapping); + + switch (OperationCode) + { + case SetSecurityDescriptor: + DPRINT("Set security descriptor\n"); + ASSERT((PoolType == PagedPool) || (PoolType == NonPagedPool)); + /* HACK */ + break; + + case QuerySecurityDescriptor: + DPRINT("Query security descriptor\n"); + return CmpQuerySecurityDescriptor(ObjectBody, + *SecurityInformation, + SecurityDescriptor, + BufferLength); + + case DeleteSecurityDescriptor: + DPRINT("Delete security descriptor\n"); + /* HACK */ + break; + + case AssignSecurityDescriptor: + DPRINT("Assign security descriptor\n"); + /* HACK */ + break; + + default: + KeBugCheckEx(SECURITY_SYSTEM, 0, STATUS_INVALID_PARAMETER, 0, 0); + } + /* HACK */ return STATUS_SUCCESS; }
10 years, 4 months
1
0
0
0
[tfaber] 63776: [ADVAPI32] - Fix RegQueryInfoKeyW as per CORE-1136
by tfaber@svn.reactos.org
Author: tfaber Date: Tue Jul 29 21:24:24 2014 New Revision: 63776 URL:
http://svn.reactos.org/svn/reactos?rev=63776&view=rev
Log: [ADVAPI32] - Fix RegQueryInfoKeyW as per CORE-1136 Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Tue Jul 29 21:24:24 2014 @@ -3903,7 +3903,7 @@ NULL, 0, lpcbSecurityDescriptor); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && Status != STATUS_BUFFER_TOO_SMALL) { if (lpClass != NULL) {
10 years, 4 months
1
0
0
0
[tfaber] 63775: [ADVAPI32] - Don't skip NtQuerySecurityObject calls. The kernel can handle then just fine.
by tfaber@svn.reactos.org
Author: tfaber Date: Tue Jul 29 21:00:30 2014 New Revision: 63775 URL:
http://svn.reactos.org/svn/reactos?rev=63775&view=rev
Log: [ADVAPI32] - Don't skip NtQuerySecurityObject calls. The kernel can handle then just fine. Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Tue Jul 29 21:00:30 2014 @@ -3168,13 +3168,11 @@ return RtlNtStatusToDosError(Status); } -#if 0 Status = NtQuerySecurityObject(KeyHandle, SecurityInformation, pSecurityDescriptor, *lpcbSecurityDescriptor, lpcbSecurityDescriptor); -#endif ClosePredefKey(KeyHandle); @@ -3896,7 +3894,6 @@ *lpcbMaxValueLen = FullInfo->MaxValueDataLen; } -#if 0 if (lpcbSecurityDescriptor != NULL) { Status = NtQuerySecurityObject(KeyHandle, @@ -3919,7 +3916,6 @@ goto Cleanup; } } -#endif if (lpftLastWriteTime != NULL) {
10 years, 4 months
1
0
0
0
[tfaber] 63774: [RTL] - Fix copypasta in RtlValidSecurityDescriptor
by tfaber@svn.reactos.org
Author: tfaber Date: Tue Jul 29 20:29:14 2014 New Revision: 63774 URL:
http://svn.reactos.org/svn/reactos?rev=63774&view=rev
Log: [RTL] - Fix copypasta in RtlValidSecurityDescriptor Modified: trunk/reactos/lib/rtl/sd.c Modified: trunk/reactos/lib/rtl/sd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/sd.c?rev=63774&r1=…
============================================================================== --- trunk/reactos/lib/rtl/sd.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/sd.c [iso-8859-1] Tue Jul 29 20:29:14 2014 @@ -1070,7 +1070,7 @@ /* Group SID must be valid if present */ Group = SepGetGroupFromDescriptor(Sd); - if ((Owner) && (!RtlValidSid(Group))) _SEH2_YIELD(return FALSE); + if ((Group) && (!RtlValidSid(Group))) _SEH2_YIELD(return FALSE); /* DACL must be valid if present */ Dacl = SepGetDaclFromDescriptor(Sd);
10 years, 4 months
1
0
0
0
[tfaber] 63773: [CRT] - Make some unicode printf functions actually unicode CORE-7691
by tfaber@svn.reactos.org
Author: tfaber Date: Tue Jul 29 16:02:55 2014 New Revision: 63773 URL:
http://svn.reactos.org/svn/reactos?rev=63773&view=rev
Log: [CRT] - Make some unicode printf functions actually unicode CORE-7691 Modified: trunk/reactos/lib/sdk/crt/printf/swprintf_s.c trunk/reactos/lib/sdk/crt/printf/wvsnprintfW.c trunk/reactos/lib/sdk/crt/printf/wvsprintfW.c Modified: trunk/reactos/lib/sdk/crt/printf/swprintf_s.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/printf/swprint…
============================================================================== --- trunk/reactos/lib/sdk/crt/printf/swprintf_s.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/printf/swprintf_s.c [iso-8859-1] Tue Jul 29 16:02:55 2014 @@ -9,6 +9,7 @@ #define _sxprintf swprintf_s #define USE_COUNT 0 #define USE_VARARGS 0 +#define _UNICODE #define IS_SECAPI 1 #include "_sxprintf.c" Modified: trunk/reactos/lib/sdk/crt/printf/wvsnprintfW.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/printf/wvsnpri…
============================================================================== --- trunk/reactos/lib/sdk/crt/printf/wvsnprintfW.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/printf/wvsnprintfW.c [iso-8859-1] Tue Jul 29 16:02:55 2014 @@ -9,6 +9,7 @@ #define _sxprintf wvsnprintfW #define USE_COUNT 1 #define USE_VARARGS 1 +#define _UNICODE #define USER32_WSPRINTF #include "_sxprintf.c" Modified: trunk/reactos/lib/sdk/crt/printf/wvsprintfW.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/printf/wvsprin…
============================================================================== --- trunk/reactos/lib/sdk/crt/printf/wvsprintfW.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/printf/wvsprintfW.c [iso-8859-1] Tue Jul 29 16:02:55 2014 @@ -9,6 +9,7 @@ #define _sxprintf wvsprintfW #define USE_COUNT 0 #define USE_VARARGS 1 +#define _UNICODE #define USER32_WSPRINTF #include "_sxprintf.c"
10 years, 4 months
1
0
0
0
[hbelusca] 63772: [KERNEL32] - It is supposed that user buffers are valid, and if not, access to them is protected with SEH. This fixes almost all of the kernel32_winetest:console tests. - Add para...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Jul 29 15:59:17 2014 New Revision: 63772 URL:
http://svn.reactos.org/svn/reactos?rev=63772&view=rev
Log: [KERNEL32] - It is supposed that user buffers are valid, and if not, access to them is protected with SEH. This fixes almost all of the kernel32_winetest:console tests. - Add parameter annotations. Modified: branches/condrv_restructure/dll/win32/kernel32/client/console/readwrite.c Modified: branches/condrv_restructure/dll/win32/kernel32/client/console/readwrite.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/dll/win32/ke…
============================================================================== --- branches/condrv_restructure/dll/win32/kernel32/client/console/readwrite.c [iso-8859-1] (original) +++ branches/condrv_restructure/dll/win32/kernel32/client/console/readwrite.c [iso-8859-1] Tue Jul 29 15:59:17 2014 @@ -118,29 +118,30 @@ static BOOL -IntGetConsoleInput(HANDLE hConsoleInput, - PINPUT_RECORD lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsRead, - WORD wFlags, - BOOLEAN bUnicode) -{ +IntGetConsoleInput(IN HANDLE hConsoleInput, + OUT PINPUT_RECORD lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsRead, + IN WORD wFlags, + IN BOOLEAN bUnicode) +{ + BOOL Success; CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_GETINPUT GetInputRequest = &ApiMessage.Data.GetInputRequest; PCSR_CAPTURE_BUFFER CaptureBuffer = NULL; - if (lpBuffer == NULL) - { - SetLastError(ERROR_INVALID_ACCESS); - return FALSE; - } - if (!IsConsoleHandle(hConsoleInput)) { - SetLastError(ERROR_INVALID_HANDLE); - - if (lpNumberOfEventsRead != NULL) + _SEH2_TRY + { *lpNumberOfEventsRead = 0; + SetLastError(ERROR_INVALID_HANDLE); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastError(ERROR_INVALID_ACCESS); + } + _SEH2_END; return FALSE; } @@ -191,33 +192,37 @@ sizeof(*GetInputRequest)); /* Check for success */ - if (NT_SUCCESS(ApiMessage.Status)) - { - /* Return the number of events read */ + Success = NT_SUCCESS(ApiMessage.Status); + + /* Retrieve the results */ + _SEH2_TRY + { DPRINT("Events read: %lx\n", GetInputRequest->NumRecords); - - if (lpNumberOfEventsRead != NULL) - *lpNumberOfEventsRead = GetInputRequest->NumRecords; - - /* Copy into the buffer */ - RtlCopyMemory(lpBuffer, - GetInputRequest->RecordBufPtr, - GetInputRequest->NumRecords * sizeof(INPUT_RECORD)); - } - else - { - if (lpNumberOfEventsRead != NULL) - *lpNumberOfEventsRead = 0; - - /* Error out */ - BaseSetLastNTError(ApiMessage.Status); - } + *lpNumberOfEventsRead = GetInputRequest->NumRecords; + + if (Success) + { + RtlCopyMemory(lpBuffer, + GetInputRequest->RecordBufPtr, + GetInputRequest->NumRecords * sizeof(INPUT_RECORD)); + } + else + { + BaseSetLastNTError(ApiMessage.Status); + } + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastError(ERROR_INVALID_ACCESS); + Success = FALSE; + } + _SEH2_END; /* Release the capture buffer if needed */ if (CaptureBuffer) CsrFreeCaptureBuffer(CaptureBuffer); - /* Return TRUE or FALSE */ - return NT_SUCCESS(ApiMessage.Status); + /* Return success status */ + return Success; } @@ -305,13 +310,14 @@ static BOOL -IntReadConsoleOutputCode(HANDLE hConsoleOutput, - CODE_TYPE CodeType, - PVOID pCode, - DWORD nLength, - COORD dwReadCoord, - LPDWORD lpNumberOfCodesRead) -{ +IntReadConsoleOutputCode(IN HANDLE hConsoleOutput, + IN CODE_TYPE CodeType, + OUT PVOID pCode, + IN DWORD nLength, + IN COORD dwReadCoord, + OUT LPDWORD lpNumberOfCodesRead) +{ + BOOL Success; CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_READOUTPUTCODE ReadOutputCodeRequest = &ApiMessage.Data.ReadOutputCodeRequest; PCSR_CAPTURE_BUFFER CaptureBuffer = NULL; @@ -386,30 +392,36 @@ sizeof(*ReadOutputCodeRequest)); /* Check for success */ - if (NT_SUCCESS(ApiMessage.Status)) - { - DWORD NumCodes = ReadOutputCodeRequest->NumCodes; - RtlCopyMemory(pCode, - ReadOutputCodeRequest->pCode, - NumCodes * CodeSize); - - if (lpNumberOfCodesRead != NULL) - *lpNumberOfCodesRead = NumCodes; - } - else - { - if (lpNumberOfCodesRead != NULL) - *lpNumberOfCodesRead = 0; - - /* Error out */ - BaseSetLastNTError(ApiMessage.Status); - } + Success = NT_SUCCESS(ApiMessage.Status); + + /* Retrieve the results */ + _SEH2_TRY + { + *lpNumberOfCodesRead = ReadOutputCodeRequest->NumCodes; + + if (Success) + { + RtlCopyMemory(pCode, + ReadOutputCodeRequest->pCode, + ReadOutputCodeRequest->NumCodes * CodeSize); + } + else + { + BaseSetLastNTError(ApiMessage.Status); + } + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastError(ERROR_INVALID_ACCESS); + Success = FALSE; + } + _SEH2_END; /* Release the capture buffer if needed */ if (CaptureBuffer) CsrFreeCaptureBuffer(CaptureBuffer); - /* Return TRUE or FALSE */ - return NT_SUCCESS(ApiMessage.Status); + /* Return success status */ + return Success; } @@ -488,22 +500,17 @@ static BOOL -IntWriteConsoleInput(HANDLE hConsoleInput, - PINPUT_RECORD lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsWritten, - BOOLEAN bUnicode, - BOOLEAN bAppendToEnd) -{ +IntWriteConsoleInput(IN HANDLE hConsoleInput, + IN PINPUT_RECORD lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsWritten, + IN BOOLEAN bUnicode, + IN BOOLEAN bAppendToEnd) +{ + BOOL Success; CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_WRITEINPUT WriteInputRequest = &ApiMessage.Data.WriteInputRequest; PCSR_CAPTURE_BUFFER CaptureBuffer = NULL; - - if (lpBuffer == NULL) - { - SetLastError(ERROR_INVALID_ACCESS); - return FALSE; - } DPRINT("IntWriteConsoleInput: %lx %p\n", nLength, lpNumberOfEventsWritten); @@ -525,9 +532,18 @@ WriteInputRequest->RecordBufPtr = WriteInputRequest->RecordStaticBuffer; // CaptureBuffer = NULL; - RtlCopyMemory(WriteInputRequest->RecordBufPtr, - lpBuffer, - nLength * sizeof(INPUT_RECORD)); + _SEH2_TRY + { + RtlCopyMemory(WriteInputRequest->RecordBufPtr, + lpBuffer, + nLength * sizeof(INPUT_RECORD)); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastError(ERROR_INVALID_ACCESS); + return FALSE; + } + _SEH2_END; } else { @@ -555,29 +571,30 @@ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepWriteConsoleInput), sizeof(*WriteInputRequest)); + /* Check for success */ + Success = NT_SUCCESS(ApiMessage.Status); + /* Release the capture buffer if needed */ if (CaptureBuffer) CsrFreeCaptureBuffer(CaptureBuffer); - /* Check for success */ - if (NT_SUCCESS(ApiMessage.Status)) - { - /* Return the number of events written */ + /* Retrieve the results */ + _SEH2_TRY + { DPRINT("Events written: %lx\n", WriteInputRequest->NumRecords); - - if (lpNumberOfEventsWritten != NULL) - *lpNumberOfEventsWritten = WriteInputRequest->NumRecords; - } - else - { - if (lpNumberOfEventsWritten != NULL) - *lpNumberOfEventsWritten = 0; - - /* Error out */ - BaseSetLastNTError(ApiMessage.Status); - } - - /* Return TRUE or FALSE */ - return NT_SUCCESS(ApiMessage.Status); + *lpNumberOfEventsWritten = WriteInputRequest->NumRecords; + + if (!Success) + BaseSetLastNTError(ApiMessage.Status); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastError(ERROR_INVALID_ACCESS); + Success = FALSE; + } + _SEH2_END; + + /* Return success status */ + return Success; } @@ -661,23 +678,18 @@ static BOOL -IntWriteConsoleOutputCode(HANDLE hConsoleOutput, - CODE_TYPE CodeType, - CONST VOID *pCode, - DWORD nLength, - COORD dwWriteCoord, - LPDWORD lpNumberOfCodesWritten) -{ +IntWriteConsoleOutputCode(IN HANDLE hConsoleOutput, + IN CODE_TYPE CodeType, + IN CONST VOID *pCode, + IN DWORD nLength, + IN COORD dwWriteCoord, + OUT LPDWORD lpNumberOfCodesWritten) +{ + BOOL Success; CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_WRITEOUTPUTCODE WriteOutputCodeRequest = &ApiMessage.Data.WriteOutputCodeRequest; PCSR_CAPTURE_BUFFER CaptureBuffer = NULL; ULONG SizeBytes, CodeSize; - - if (pCode == NULL) - { - SetLastError(ERROR_INVALID_ACCESS); - return FALSE; - } if ( (CodeType != CODE_ASCII ) && (CodeType != CODE_UNICODE ) && @@ -724,9 +736,18 @@ WriteOutputCodeRequest->pCode = WriteOutputCodeRequest->CodeStaticBuffer; // CaptureBuffer = NULL; - RtlCopyMemory(WriteOutputCodeRequest->pCode, - pCode, - SizeBytes); + _SEH2_TRY + { + RtlCopyMemory(WriteOutputCodeRequest->pCode, + pCode, + SizeBytes); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastError(ERROR_INVALID_ACCESS); + return FALSE; + } + _SEH2_END; } else { @@ -752,38 +773,42 @@ CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepWriteConsoleOutputString), sizeof(*WriteOutputCodeRequest)); + /* Check for success */ + Success = NT_SUCCESS(ApiMessage.Status); + /* Release the capture buffer if needed */ if (CaptureBuffer) CsrFreeCaptureBuffer(CaptureBuffer); - /* Check for success */ - if (NT_SUCCESS(ApiMessage.Status)) - { - if (lpNumberOfCodesWritten != NULL) - *lpNumberOfCodesWritten = WriteOutputCodeRequest->NumCodes; - } - else - { - if (lpNumberOfCodesWritten != NULL) - *lpNumberOfCodesWritten = 0; - - /* Error out */ - BaseSetLastNTError(ApiMessage.Status); - } - - /* Return TRUE or FALSE */ - return NT_SUCCESS(ApiMessage.Status); + /* Retrieve the results */ + _SEH2_TRY + { + *lpNumberOfCodesWritten = WriteOutputCodeRequest->NumCodes; + + if (!Success) + BaseSetLastNTError(ApiMessage.Status); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastError(ERROR_INVALID_ACCESS); + Success = FALSE; + } + _SEH2_END; + + /* Return success status */ + return Success; } static BOOL -IntFillConsoleOutputCode(HANDLE hConsoleOutput, - CODE_TYPE CodeType, - CODE_ELEMENT Code, - DWORD nLength, - COORD dwWriteCoord, - LPDWORD lpNumberOfCodesWritten) -{ +IntFillConsoleOutputCode(IN HANDLE hConsoleOutput, + IN CODE_TYPE CodeType, + IN CODE_ELEMENT Code, + IN DWORD nLength, + IN COORD dwWriteCoord, + OUT LPDWORD lpNumberOfCodesWritten) +{ + BOOL Success; CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_FILLOUTPUTCODE FillOutputRequest = &ApiMessage.Data.FillOutputRequest; @@ -812,21 +837,25 @@ sizeof(*FillOutputRequest)); /* Check for success */ - if (NT_SUCCESS(ApiMessage.Status)) - { - if (lpNumberOfCodesWritten != NULL) - *lpNumberOfCodesWritten = FillOutputRequest->NumCodes; - } - else - { - if (lpNumberOfCodesWritten != NULL) - *lpNumberOfCodesWritten = 0; - - BaseSetLastNTError(ApiMessage.Status); - } - - /* Return TRUE or FALSE */ - return NT_SUCCESS(ApiMessage.Status); + Success = NT_SUCCESS(ApiMessage.Status); + + /* Retrieve the results */ + _SEH2_TRY + { + *lpNumberOfCodesWritten = FillOutputRequest->NumCodes; + + if (!Success) + BaseSetLastNTError(ApiMessage.Status); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastError(ERROR_INVALID_ACCESS); + Success = FALSE; + } + _SEH2_END; + + /* Return success status */ + return Success; } @@ -887,10 +916,10 @@ */ BOOL WINAPI -PeekConsoleInputW(HANDLE hConsoleInput, - PINPUT_RECORD lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsRead) +PeekConsoleInputW(IN HANDLE hConsoleInput, + OUT PINPUT_RECORD lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsRead) { return IntGetConsoleInput(hConsoleInput, lpBuffer, @@ -908,10 +937,10 @@ */ BOOL WINAPI -PeekConsoleInputA(HANDLE hConsoleInput, - PINPUT_RECORD lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsRead) +PeekConsoleInputA(IN HANDLE hConsoleInput, + OUT PINPUT_RECORD lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsRead) { return IntGetConsoleInput(hConsoleInput, lpBuffer, @@ -929,10 +958,10 @@ */ BOOL WINAPI -ReadConsoleInputW(HANDLE hConsoleInput, - PINPUT_RECORD lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsRead) +ReadConsoleInputW(IN HANDLE hConsoleInput, + OUT PINPUT_RECORD lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsRead) { return IntGetConsoleInput(hConsoleInput, lpBuffer, @@ -950,10 +979,10 @@ */ BOOL WINAPI -ReadConsoleInputA(HANDLE hConsoleInput, - PINPUT_RECORD lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsRead) +ReadConsoleInputA(IN HANDLE hConsoleInput, + OUT PINPUT_RECORD lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsRead) { return IntGetConsoleInput(hConsoleInput, lpBuffer, @@ -971,11 +1000,11 @@ */ BOOL WINAPI -ReadConsoleInputExW(HANDLE hConsoleInput, - PINPUT_RECORD lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsRead, - WORD wFlags) +ReadConsoleInputExW(IN HANDLE hConsoleInput, + OUT PINPUT_RECORD lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsRead, + IN WORD wFlags) { return IntGetConsoleInput(hConsoleInput, lpBuffer, @@ -993,11 +1022,11 @@ */ BOOL WINAPI -ReadConsoleInputExA(HANDLE hConsoleInput, - PINPUT_RECORD lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsRead, - WORD wFlags) +ReadConsoleInputExA(IN HANDLE hConsoleInput, + OUT PINPUT_RECORD lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsRead, + IN WORD wFlags) { return IntGetConsoleInput(hConsoleInput, lpBuffer, @@ -1059,11 +1088,11 @@ */ BOOL WINAPI -ReadConsoleOutputCharacterW(HANDLE hConsoleOutput, - LPWSTR lpCharacter, - DWORD nLength, - COORD dwReadCoord, - LPDWORD lpNumberOfCharsRead) +ReadConsoleOutputCharacterW(IN HANDLE hConsoleOutput, + OUT LPWSTR lpCharacter, + IN DWORD nLength, + IN COORD dwReadCoord, + OUT LPDWORD lpNumberOfCharsRead) { return IntReadConsoleOutputCode(hConsoleOutput, CODE_UNICODE, @@ -1081,11 +1110,11 @@ */ BOOL WINAPI -ReadConsoleOutputCharacterA(HANDLE hConsoleOutput, - LPSTR lpCharacter, - DWORD nLength, - COORD dwReadCoord, - LPDWORD lpNumberOfCharsRead) +ReadConsoleOutputCharacterA(IN HANDLE hConsoleOutput, + OUT LPSTR lpCharacter, + IN DWORD nLength, + IN COORD dwReadCoord, + OUT LPDWORD lpNumberOfCharsRead) { return IntReadConsoleOutputCode(hConsoleOutput, CODE_ASCII, @@ -1103,11 +1132,11 @@ */ BOOL WINAPI -ReadConsoleOutputAttribute(HANDLE hConsoleOutput, - LPWORD lpAttribute, - DWORD nLength, - COORD dwReadCoord, - LPDWORD lpNumberOfAttrsRead) +ReadConsoleOutputAttribute(IN HANDLE hConsoleOutput, + OUT LPWORD lpAttribute, + IN DWORD nLength, + IN COORD dwReadCoord, + OUT LPDWORD lpNumberOfAttrsRead) { return IntReadConsoleOutputCode(hConsoleOutput, CODE_ATTRIBUTE, @@ -1173,10 +1202,10 @@ */ BOOL WINAPI -WriteConsoleInputW(HANDLE hConsoleInput, - CONST INPUT_RECORD *lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsWritten) +WriteConsoleInputW(IN HANDLE hConsoleInput, + IN CONST INPUT_RECORD *lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsWritten) { return IntWriteConsoleInput(hConsoleInput, (PINPUT_RECORD)lpBuffer, @@ -1194,10 +1223,10 @@ */ BOOL WINAPI -WriteConsoleInputA(HANDLE hConsoleInput, - CONST INPUT_RECORD *lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsWritten) +WriteConsoleInputA(IN HANDLE hConsoleInput, + IN CONST INPUT_RECORD *lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsWritten) { return IntWriteConsoleInput(hConsoleInput, (PINPUT_RECORD)lpBuffer, @@ -1215,10 +1244,10 @@ */ BOOL WINAPI -WriteConsoleInputVDMW(HANDLE hConsoleInput, - CONST INPUT_RECORD *lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsWritten) +WriteConsoleInputVDMW(IN HANDLE hConsoleInput, + IN CONST INPUT_RECORD *lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsWritten) { return IntWriteConsoleInput(hConsoleInput, (PINPUT_RECORD)lpBuffer, @@ -1236,10 +1265,10 @@ */ BOOL WINAPI -WriteConsoleInputVDMA(HANDLE hConsoleInput, - CONST INPUT_RECORD *lpBuffer, - DWORD nLength, - LPDWORD lpNumberOfEventsWritten) +WriteConsoleInputVDMA(IN HANDLE hConsoleInput, + IN CONST INPUT_RECORD *lpBuffer, + IN DWORD nLength, + OUT LPDWORD lpNumberOfEventsWritten) { return IntWriteConsoleInput(hConsoleInput, (PINPUT_RECORD)lpBuffer, @@ -1301,11 +1330,11 @@ */ BOOL WINAPI -WriteConsoleOutputCharacterW(HANDLE hConsoleOutput, - LPCWSTR lpCharacter, - DWORD nLength, - COORD dwWriteCoord, - LPDWORD lpNumberOfCharsWritten) +WriteConsoleOutputCharacterW(IN HANDLE hConsoleOutput, + IN LPCWSTR lpCharacter, + IN DWORD nLength, + IN COORD dwWriteCoord, + OUT LPDWORD lpNumberOfCharsWritten) { return IntWriteConsoleOutputCode(hConsoleOutput, CODE_UNICODE, @@ -1323,11 +1352,11 @@ */ BOOL WINAPI -WriteConsoleOutputCharacterA(HANDLE hConsoleOutput, - LPCSTR lpCharacter, - DWORD nLength, - COORD dwWriteCoord, - LPDWORD lpNumberOfCharsWritten) +WriteConsoleOutputCharacterA(IN HANDLE hConsoleOutput, + IN LPCSTR lpCharacter, + IN DWORD nLength, + IN COORD dwWriteCoord, + OUT LPDWORD lpNumberOfCharsWritten) { return IntWriteConsoleOutputCode(hConsoleOutput, CODE_ASCII, @@ -1345,11 +1374,11 @@ */ BOOL WINAPI -WriteConsoleOutputAttribute(HANDLE hConsoleOutput, - CONST WORD *lpAttribute, - DWORD nLength, - COORD dwWriteCoord, - LPDWORD lpNumberOfAttrsWritten) +WriteConsoleOutputAttribute(IN HANDLE hConsoleOutput, + IN CONST WORD *lpAttribute, + IN DWORD nLength, + IN COORD dwWriteCoord, + OUT LPDWORD lpNumberOfAttrsWritten) { return IntWriteConsoleOutputCode(hConsoleOutput, CODE_ATTRIBUTE, @@ -1367,11 +1396,11 @@ */ BOOL WINAPI -FillConsoleOutputCharacterW(HANDLE hConsoleOutput, - WCHAR cCharacter, - DWORD nLength, - COORD dwWriteCoord, - LPDWORD lpNumberOfCharsWritten) +FillConsoleOutputCharacterW(IN HANDLE hConsoleOutput, + IN WCHAR cCharacter, + IN DWORD nLength, + IN COORD dwWriteCoord, + OUT LPDWORD lpNumberOfCharsWritten) { CODE_ELEMENT Code; Code.UnicodeChar = cCharacter; @@ -1391,10 +1420,10 @@ */ BOOL WINAPI -FillConsoleOutputCharacterA(HANDLE hConsoleOutput, - CHAR cCharacter, - DWORD nLength, - COORD dwWriteCoord, +FillConsoleOutputCharacterA(IN HANDLE hConsoleOutput, + IN CHAR cCharacter, + IN DWORD nLength, + IN COORD dwWriteCoord, LPDWORD lpNumberOfCharsWritten) { CODE_ELEMENT Code; @@ -1415,11 +1444,11 @@ */ BOOL WINAPI -FillConsoleOutputAttribute(HANDLE hConsoleOutput, - WORD wAttribute, - DWORD nLength, - COORD dwWriteCoord, - LPDWORD lpNumberOfAttrsWritten) +FillConsoleOutputAttribute(IN HANDLE hConsoleOutput, + IN WORD wAttribute, + IN DWORD nLength, + IN COORD dwWriteCoord, + OUT LPDWORD lpNumberOfAttrsWritten) { CODE_ELEMENT Code; Code.Attribute = wAttribute;
10 years, 4 months
1
0
0
0
← Newer
1
2
3
4
5
...
12
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
Results per page:
10
25
50
100
200