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
September 2012
----- 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
17 participants
236 discussions
Start a n
N
ew thread
[ion] 57264: [CMLIB]: Forgot part of last patch.
by ion@svn.reactos.org
Author: ion Date: Mon Sep 10 15:32:43 2012 New Revision: 57264 URL:
http://svn.reactos.org/svn/reactos?rev=57264&view=rev
Log: [CMLIB]: Forgot part of last patch. Modified: trunk/reactos/lib/cmlib/cmlib.h Modified: trunk/reactos/lib/cmlib/cmlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.h?rev=5726…
============================================================================== --- trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] Mon Sep 10 15:32:43 2012 @@ -242,8 +242,11 @@ PHHIVE RegistryHive, HCELL_INDEX CellOffset); -#define HvReleaseCell(h, c) \ - if (h->ReleaseCellRoutine) h->ReleaseCellRoutine(h, c) +#define HvReleaseCell(h, c) \ +do { \ + if ((h)->ReleaseCellRoutine) \ + (h)->ReleaseCellRoutine(h, c); \ +} while(0) LONG CMAPI HvGetCellSize(
12 years, 3 months
1
0
0
0
[ion] 57263: [NTOSKRNL]: CORE-6491 #resolve #comment Implement hive list support by hbelusca, with some minor cleanups by me. Loaded hives are now in the hivelist key.
by ion@svn.reactos.org
Author: ion Date: Mon Sep 10 15:25:26 2012 New Revision: 57263 URL:
http://svn.reactos.org/svn/reactos?rev=57263&view=rev
Log: [NTOSKRNL]: CORE-6491 #resolve #comment Implement hive list support by hbelusca, with some minor cleanups by me. Loaded hives are now in the hivelist key. Modified: trunk/reactos/ntoskrnl/config/cmhvlist.c trunk/reactos/ntoskrnl/config/cmsysini.c trunk/reactos/ntoskrnl/include/internal/cm.h Modified: trunk/reactos/ntoskrnl/config/cmhvlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmhvlist.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmhvlist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmhvlist.c [iso-8859-1] Mon Sep 10 15:25:26 2012 @@ -1,24 +1,258 @@ /* * PROJECT: ReactOS Kernel * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/config/cmwraprs.c - * PURPOSE: Configuration Manager - Wrappers for Hive Operations - * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + * FILE: ntoskrnl/config/cmhvlist.c + * PURPOSE: Configuration Manager - Hives file list management + * PROGRAMMERS: Hermes BELUSCA - MAITO */ -/* INCLUDES ******************************************************************/ +/* INCLUDES *******************************************************************/ #include "ntoskrnl.h" #define NDEBUG #include "debug.h" -/* FUNCTIONS *****************************************************************/ +/* GLOBALS ********************************************************************/ + +UNICODE_STRING HiveListValueName = RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control\\hivelist"); + +/* FUNCTIONS ******************************************************************/ + +/* Note: the caller is expected to free the HiveName string buffer */ +BOOLEAN +NTAPI +CmpGetHiveName(IN PCMHIVE Hive, + OUT PUNICODE_STRING HiveName) +{ + HCELL_INDEX RootCell, LinkCell; + PCELL_DATA RootData, LinkData, ParentData; + ULONG ParentNameSize, LinkNameSize; + SIZE_T NameSize; + PWCHAR p; + UNICODE_STRING RegistryName = RTL_CONSTANT_STRING(L"\\REGISTRY\\"); + + /* Get the root cell of this hive */ + RootCell = Hive->Hive.BaseBlock->RootCell; + RootData = HvGetCell(&Hive->Hive, RootCell); + if (!RootData) return FALSE; + + /* Get the cell index at which this hive is linked to, and its parent */ + LinkCell = RootData->u.KeyNode.Parent; + HvReleaseCell(&Hive->Hive, RootCell); + + /* Sanity check */ + ASSERT((&CmiVolatileHive->Hive)->ReleaseCellRoutine == NULL); + + /* Get the cell data for link and parent */ + LinkData = HvGetCell(&CmiVolatileHive->Hive, LinkCell); + if (!LinkData) return FALSE; + ParentData = HvGetCell(&CmiVolatileHive->Hive, LinkData->u.KeyNode.Parent); + if (!ParentData) return FALSE; + + /* Get the size of the parent name */ + if (ParentData->u.KeyNode.Flags & KEY_COMP_NAME) + { + ParentNameSize = CmpCompressedNameSize(ParentData->u.KeyNode.Name, + ParentData->u.KeyNode.NameLength); + } + else + { + ParentNameSize = ParentData->u.KeyNode.NameLength; + } + + /* Get the size of the link name */ + if (LinkData->u.KeyNode.Flags & KEY_COMP_NAME) + { + LinkNameSize = CmpCompressedNameSize(LinkData->u.KeyNode.Name, + LinkData->u.KeyNode.NameLength); + } + else + { + LinkNameSize = LinkData->u.KeyNode.NameLength; + } + + /* No need to account for terminal NULL character since we deal with counted UNICODE strings */ + NameSize = RegistryName.Length + ParentNameSize + sizeof(WCHAR) + LinkNameSize; + + /* Allocate the memory */ + HiveName->Buffer = ExAllocatePoolWithTag(PagedPool, NameSize, TAG_CM); + if (!HiveName->Buffer) + { + /* Fail */ + DPRINT1("CmpGetHiveName: Unable to allocate memory\n"); + return FALSE; + } + + /* Build the string for it */ + HiveName->Length = HiveName->MaximumLength = (USHORT)NameSize; + p = HiveName->Buffer; + + /* Copy the parent name */ + RtlCopyMemory(p, RegistryName.Buffer, RegistryName.Length); + p += RegistryName.Length / sizeof(WCHAR); + if (ParentData->u.KeyNode.Flags & KEY_COMP_NAME) + { + CmpCopyCompressedName(p, + ParentNameSize, + ParentData->u.KeyNode.Name, + ParentData->u.KeyNode.NameLength); + } + else + { + RtlCopyMemory(p, ParentData->u.KeyNode.Name, ParentNameSize); + } + + /* Add a path separator between parent and link */ + p += ParentNameSize / sizeof(WCHAR); + *p = OBJ_NAME_PATH_SEPARATOR; + ++p; + + /* Now copy the link name */ + if (LinkData->u.KeyNode.Flags & KEY_COMP_NAME) + { + CmpCopyCompressedName(p, + LinkNameSize, + LinkData->u.KeyNode.Name, + LinkData->u.KeyNode.NameLength); + + } + else + { + RtlCopyMemory(p, LinkData->u.KeyNode.Name, LinkNameSize); + } + + /* All done */ + return TRUE; +} NTSTATUS NTAPI CmpAddToHiveFileList(IN PCMHIVE Hive) { - return STATUS_SUCCESS; + NTSTATUS Status; + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE KeyHandle; + UNICODE_STRING HivePath; + PWCHAR FilePath; + CHAR Buffer[sizeof(OBJECT_NAME_INFORMATION) + 512 * sizeof(WCHAR)]; + ULONG Length = sizeof(Buffer); + POBJECT_NAME_INFORMATION LocalNameInfo = (POBJECT_NAME_INFORMATION)&Buffer; + HivePath.Buffer = NULL; + + /* Create or open the hive list key */ + InitializeObjectAttributes(&ObjectAttributes, + &HiveListValueName, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, + NULL); + Status = ZwCreateKey(&KeyHandle, + KEY_READ | KEY_WRITE, + &ObjectAttributes, + 0, + NULL, + REG_OPTION_VOLATILE, + NULL); + if (!NT_SUCCESS(Status)) + { + /* Fail */ + DPRINT1("CmpAddToHiveFileList: Creation or opening of the hive list failed, status = %08lx\n", Status); + return Status; + } + + /* Retrieve the name of the hive */ + if (!CmpGetHiveName(Hive, &HivePath)) + { + /* Fail */ + DPRINT1("CmpAddToHiveFileList: Unable to retrieve the hive name\n"); + Status = STATUS_NO_MEMORY; + goto Quickie; + } + + /* Get the name of the corresponding file */ + if (!(Hive->Hive.HiveFlags & HIVE_VOLATILE)) + { + /* Try to get the value */ + Status = ZwQueryObject(Hive->FileHandles[HFILE_TYPE_PRIMARY], + ObjectNameInformation, + LocalNameInfo, + Length, + &Length); + if (NT_SUCCESS(Status)) + { + /* Null-terminate and add the length of the terminator */ + Length -= sizeof(OBJECT_NAME_INFORMATION); + FilePath = LocalNameInfo->Name.Buffer; + FilePath[Length / sizeof(WCHAR)] = UNICODE_NULL; + Length += sizeof(UNICODE_NULL); + } + else + { + /* Fail */ + DPRINT1("CmpAddToHiveFileList: Hive file name query failed, status = %08lx\n", Status); + goto Quickie; + } + } + else + { + /* No name */ + FilePath = L""; + Length = sizeof(UNICODE_NULL); + } + + /* Set the entry in the hive list */ + Status = ZwSetValueKey(KeyHandle, + &HivePath, + 0, + REG_SZ, + FilePath, + Length); + if (!NT_SUCCESS(Status)) + { + /* Fail */ + DPRINT1("CmpAddToHiveFileList: Setting of entry in the hive list failed, status = %08lx\n", Status); + } + +Quickie: + /* Cleanup and return status */ + if (HivePath.Buffer) ExFreePoolWithTag(HivePath.Buffer, TAG_CM); + ObCloseHandle(KeyHandle, KernelMode); + return Status; } -/* EOF */ +VOID +NTAPI +CmpRemoveFromHiveFileList(IN PCMHIVE Hive) +{ + NTSTATUS Status; + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE KeyHandle; + UNICODE_STRING HivePath; + + /* Open the hive list key */ + InitializeObjectAttributes(&ObjectAttributes, + &HiveListValueName, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, + NULL); + Status = ZwOpenKey(&KeyHandle, + KEY_READ | KEY_WRITE, + &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + /* Fail */ + DPRINT1("CmpRemoveFromHiveFileList: Opening of the hive list failed, status = %08lx\n", Status); + return; + } + + /* Get the hive path name */ + CmpGetHiveName(Hive, &HivePath); + + /* Delete the hive path name from the list */ + ZwDeleteValueKey(KeyHandle, &HivePath); + + /* Cleanup allocation and handle */ + ExFreePoolWithTag(HivePath.Buffer, TAG_CM); + ObCloseHandle(KeyHandle, KernelMode); +} + +/* EOF */ Modified: trunk/reactos/ntoskrnl/config/cmsysini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Mon Sep 10 15:25:26 2012 @@ -1381,7 +1381,8 @@ /* Check if we created a new hive */ if (CmpMachineHiveList[i].CmHive2) { - /* TODO: Add to HiveList key */ + /* Add to HiveList key */ + CmpAddToHiveFileList(CmpMachineHiveList[i].CmHive2); } } @@ -1569,7 +1570,8 @@ KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 12, Status, 0); } - /* FIXME: Add to HiveList key */ + /* Add to HiveList key */ + CmpAddToHiveFileList(HardwareHive); /* Free the security descriptor */ ExFreePoolWithTag(SecurityDescriptor, TAG_CM); Modified: trunk/reactos/ntoskrnl/include/internal/cm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/cm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/cm.h [iso-8859-1] Mon Sep 10 15:25:26 2012 @@ -624,9 +624,22 @@ // // Hive List Routines // +BOOLEAN +NTAPI +CmpGetHiveName( + IN PCMHIVE Hive, + OUT PUNICODE_STRING HiveName +); + NTSTATUS NTAPI CmpAddToHiveFileList( + IN PCMHIVE Hive +); + +VOID +NTAPI +CmpRemoveFromHiveFileList( IN PCMHIVE Hive );
12 years, 3 months
1
0
0
0
[ion] 57262: [NTOSKRNL]: CORE-6597 #resolve #time 5m #comment Fix incorrect double list increment
by ion@svn.reactos.org
Author: ion Date: Mon Sep 10 15:00:16 2012 New Revision: 57262 URL:
http://svn.reactos.org/svn/reactos?rev=57262&view=rev
Log: [NTOSKRNL]: CORE-6597 #resolve #time 5m #comment Fix incorrect double list increment Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/expool.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] Mon Sep 10 15:00:16 2012 @@ -1583,6 +1583,7 @@ // i = (USHORT)((NumberOfBytes + sizeof(POOL_HEADER) + (POOL_BLOCK_SIZE - 1)) / POOL_BLOCK_SIZE); + ASSERT(i < POOL_LISTS_PER_PAGE); // // Handle lookaside list optimization for both paged and nonpaged pool @@ -1664,7 +1665,6 @@ // Try again! // ExUnlockPool(PoolDesc, OldIrql); - ListHead++; continue; }
12 years, 3 months
1
0
0
0
[ion] 57261: [NTOSKRNL]: Small refactoring and optimizations to some Se routines, mainly generalizations for Restricted Token support once someone implements it. Also start using the token lock whe...
by ion@svn.reactos.org
Author: ion Date: Mon Sep 10 08:15:43 2012 New Revision: 57261 URL:
http://svn.reactos.org/svn/reactos?rev=57261&view=rev
Log: [NTOSKRNL]: Small refactoring and optimizations to some Se routines, mainly generalizations for Restricted Token support once someone implements it. Also start using the token lock when necessary. Add comments when missing. Nothing terribly exciting... [NTOSKRNL]: As a side effect, implement SeCreateClientSecurityFromSubjectContext and SeGetTokenControlInformation, although most of the code was already there. [NTOSKRNL]: One useful change, SE_GROUP_USE_FOR_DENY_ONLY (Deny Only Groups) are now handled correctly. Modified: trunk/reactos/ntoskrnl/include/internal/se.h trunk/reactos/ntoskrnl/se/access.c trunk/reactos/ntoskrnl/se/sd.c trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/ntoskrnl/include/internal/se.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/se.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/se.h [iso-8859-1] Mon Sep 10 08:15:43 2012 @@ -1,4 +1,80 @@ #pragma once + +PSID +FORCEINLINE +SepGetGroupFromDescriptor(PVOID _Descriptor) +{ + PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; + PISECURITY_DESCRIPTOR_RELATIVE SdRel; + + if (Descriptor->Control & SE_SELF_RELATIVE) + { + SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; + if (!SdRel->Group) return NULL; + return (PSID)((ULONG_PTR)Descriptor + SdRel->Group); + } + else + { + return Descriptor->Group; + } +} + +PSID +FORCEINLINE +SepGetOwnerFromDescriptor(PVOID _Descriptor) +{ + PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; + PISECURITY_DESCRIPTOR_RELATIVE SdRel; + + if (Descriptor->Control & SE_SELF_RELATIVE) + { + SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; + if (!SdRel->Owner) return NULL; + return (PSID)((ULONG_PTR)Descriptor + SdRel->Owner); + } + else + { + return Descriptor->Owner; + } +} + +PACL +FORCEINLINE +SepGetDaclFromDescriptor(PVOID _Descriptor) +{ + PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; + PISECURITY_DESCRIPTOR_RELATIVE SdRel; + + if (Descriptor->Control & SE_SELF_RELATIVE) + { + SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; + if (!SdRel->Dacl) return NULL; + return (PACL)((ULONG_PTR)Descriptor + SdRel->Dacl); + } + else + { + return Descriptor->Dacl; + } +} + +PACL +FORCEINLINE +SepGetSaclFromDescriptor(PVOID _Descriptor) +{ + PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; + PISECURITY_DESCRIPTOR_RELATIVE SdRel; + + if (Descriptor->Control & SE_SELF_RELATIVE) + { + SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; + if (!SdRel->Sacl) return NULL; + return (PACL)((ULONG_PTR)Descriptor + SdRel->Sacl); + } + else + { + return Descriptor->Sacl; + } +} /* SID Authorities */ extern SID_IDENTIFIER_AUTHORITY SeNullSidAuthority; @@ -80,6 +156,34 @@ extern PSECURITY_DESCRIPTOR SeSystemDefaultSd; extern PSECURITY_DESCRIPTOR SeUnrestrictedSd; +// +// Token Functions +// +BOOLEAN +NTAPI +SepTokenIsOwner( + IN PACCESS_TOKEN _Token, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN BOOLEAN TokenLocked +); + +BOOLEAN +NTAPI +SepSidInToken( + IN PACCESS_TOKEN _Token, + IN PSID Sid +); + +BOOLEAN +NTAPI +SepSidInTokenEx( + IN PACCESS_TOKEN _Token, + IN PSID PrincipalSelfSid, + IN PSID _Sid, + IN BOOLEAN Deny, + IN BOOLEAN Restricted +); + /* Functions */ BOOLEAN NTAPI Modified: trunk/reactos/ntoskrnl/se/access.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/access.c?rev=5…
============================================================================== --- trunk/reactos/ntoskrnl/se/access.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/access.c [iso-8859-1] Mon Sep 10 08:15:43 2012 @@ -4,7 +4,7 @@ * FILE: ntoskrnl/se/access.c * PURPOSE: Access state functions * - * PROGRAMMERS: Alex Ionescu (alex(a)relsoft.net) - + * PROGRAMMERS: Alex Ionescu (alex(a)relsoft.net) - * Based on patch by Javier M. Mellid */ @@ -18,7 +18,251 @@ ERESOURCE SepSubjectContextLock; -/* FUNCTIONS ******************************************************************/ +/* PRIVATE FUNCTIONS **********************************************************/ + +BOOLEAN +NTAPI +SepSidInTokenEx(IN PACCESS_TOKEN _Token, + IN PSID PrincipalSelfSid, + IN PSID _Sid, + IN BOOLEAN Deny, + IN BOOLEAN Restricted) +{ + ULONG i; + PTOKEN Token = (PTOKEN)_Token; + PISID TokenSid, Sid = (PISID)_Sid; + PSID_AND_ATTRIBUTES SidAndAttributes; + ULONG SidCount, SidLength; + USHORT SidMetadata; + PAGED_CODE(); + + /* Not yet supported */ + ASSERT(PrincipalSelfSid == NULL); + ASSERT(Restricted == FALSE); + + /* Check if a principal SID was given, and this is our current SID already */ + if ((PrincipalSelfSid) && (RtlEqualSid(SePrincipalSelfSid, Sid))) + { + /* Just use the principal SID in this case */ + Sid = PrincipalSelfSid; + } + + /* Check if this is a restricted token or not */ + if (Restricted) + { + /* Use the restricted SIDs and count */ + SidAndAttributes = Token->RestrictedSids; + SidCount = Token->RestrictedSidCount; + } + else + { + /* Use the normal SIDs and count */ + SidAndAttributes = Token->UserAndGroups; + SidCount = Token->UserAndGroupCount; + } + + /* Do checks here by hand instead of the usual 4 function calls */ + SidLength = FIELD_OFFSET(SID, + SubAuthority[Sid->SubAuthorityCount]); + SidMetadata = *(PUSHORT)&Sid->Revision; + + /* Loop every SID */ + for (i = 0; i < SidCount; i++) + { + TokenSid = (PISID)SidAndAttributes->Sid; +#if SE_SID_DEBUG + UNICODE_STRING sidString; + RtlConvertSidToUnicodeString(&sidString, TokenSid, TRUE); + DPRINT1("SID in Token: %wZ\n", &sidString); + RtlFreeUnicodeString(&sidString); +#endif + /* Check if the SID metadata matches */ + if (*(PUSHORT)&TokenSid->Revision == SidMetadata) + { + /* Check if the SID data matches */ + if (RtlEqualMemory(Sid, TokenSid, SidLength)) + { + /* Check if the group is enabled, or used for deny only */ + if ((!(i) && !(SidAndAttributes->Attributes & SE_GROUP_USE_FOR_DENY_ONLY)) || + (SidAndAttributes->Attributes & SE_GROUP_ENABLED) || + ((Deny) && (SidAndAttributes->Attributes & SE_GROUP_USE_FOR_DENY_ONLY))) + { + /* SID is present */ + return TRUE; + } + else + { + /* SID is not present */ + return FALSE; + } + } + } + + /* Move to the next SID */ + SidAndAttributes++; + } + + /* SID is not present */ + return FALSE; +} + +BOOLEAN +NTAPI +SepSidInToken(IN PACCESS_TOKEN _Token, + IN PSID Sid) +{ + /* Call extended API */ + return SepSidInTokenEx(_Token, NULL, Sid, FALSE, FALSE); +} + +BOOLEAN +NTAPI +SepTokenIsOwner(IN PACCESS_TOKEN _Token, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN BOOLEAN TokenLocked) +{ + PSID Sid; + BOOLEAN Result; + PTOKEN Token = _Token; + + /* Get the owner SID */ + Sid = SepGetOwnerFromDescriptor(SecurityDescriptor); + ASSERT(Sid != NULL); + + /* Lock the token if needed */ + if (!TokenLocked) + { + KeEnterCriticalRegion(); + ExAcquireResourceSharedLite(Token->TokenLock, TRUE); + } + + /* Check if the owner SID is found, handling restricted case as well */ + Result = SepSidInToken(Token, Sid); + if ((Result) && (Token->TokenFlags & TOKEN_IS_RESTRICTED)) + { + Result = SepSidInTokenEx(Token, NULL, Sid, FALSE, TRUE); + } + + /* Release the lock if we had acquired it */ + if (!TokenLocked) + { + ExReleaseResourceLite(Token->TokenLock); + KeLeaveCriticalRegion(); + } + + /* Return the result */ + return Result; +} + +VOID +NTAPI +SeGetTokenControlInformation(IN PACCESS_TOKEN _Token, + OUT PTOKEN_CONTROL TokenControl) +{ + PTOKEN Token = _Token; + PAGED_CODE(); + + /* Capture the main fields */ + TokenControl->AuthenticationId = Token->AuthenticationId; + TokenControl->TokenId = Token->TokenId; + TokenControl->TokenSource = Token->TokenSource; + + /* Lock the token */ + KeEnterCriticalRegion(); + ExAcquireResourceSharedLite(Token->TokenLock, TRUE); + + /* Capture the modified it */ + TokenControl->ModifiedId = Token->ModifiedId; + + /* Unlock it */ + ExReleaseResourceLite(Token->TokenLock); + KeLeaveCriticalRegion(); +} + +NTSTATUS +NTAPI +SepCreateClientSecurity(IN PACCESS_TOKEN Token, + IN PSECURITY_QUALITY_OF_SERVICE ClientSecurityQos, + IN BOOLEAN ServerIsRemote, + IN TOKEN_TYPE TokenType, + IN BOOLEAN ThreadEffectiveOnly, + IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, + OUT PSECURITY_CLIENT_CONTEXT ClientContext) +{ + NTSTATUS Status; + PACCESS_TOKEN NewToken; + PAGED_CODE(); + + /* Check for bogus impersonation level */ + if (!VALID_IMPERSONATION_LEVEL(ClientSecurityQos->ImpersonationLevel)) + { + /* Fail the call */ + return STATUS_INVALID_PARAMETER; + } + + /* Check what kind of token this is */ + if (TokenType != TokenImpersonation) + { + /* On a primary token, if we do direct access, copy the flag from the QOS */ + ClientContext->DirectAccessEffectiveOnly = ClientSecurityQos->EffectiveOnly; + } + else + { + /* This is an impersonation token, is the level ok? */ + if (ClientSecurityQos->ImpersonationLevel > ImpersonationLevel) + { + /* Nope, fail */ + return STATUS_BAD_IMPERSONATION_LEVEL; + } + + /* Is the level too low, or are we doing something other than delegation remotely */ + if ((ImpersonationLevel == SecurityAnonymous) || + (ImpersonationLevel == SecurityIdentification) || + ((ServerIsRemote) && (ImpersonationLevel != SecurityDelegation))) + { + /* Fail the call */ + return STATUS_BAD_IMPERSONATION_LEVEL; + } + + /* Pick either the thread setting or the QOS setting */ + ClientContext->DirectAccessEffectiveOnly = ((ThreadEffectiveOnly) || + (ClientSecurityQos->EffectiveOnly)) ? TRUE : FALSE; + } + + /* Is this static tracking */ + if (ClientSecurityQos->ContextTrackingMode == SECURITY_STATIC_TRACKING) + { + /* Do not use direct access and make a copy */ + ClientContext->DirectlyAccessClientToken = FALSE; + Status = SeCopyClientToken(Token, ImpersonationLevel, 0, &NewToken); + if (!NT_SUCCESS(Status)) return Status; + } + else + { + /* Use direct access and check if this is local */ + ClientContext->DirectlyAccessClientToken = TRUE; + if (ServerIsRemote) + { + /* We are doing delegation, so make a copy of the control data */ + SeGetTokenControlInformation(Token, + &ClientContext->ClientTokenControl); + } + + /* Keep the same token */ + NewToken = Token; + } + + /* Fill out the context and return success */ + ClientContext->SecurityQos.Length = sizeof(SECURITY_QUALITY_OF_SERVICE); + ClientContext->SecurityQos.ImpersonationLevel = ClientSecurityQos->ImpersonationLevel; + ClientContext->SecurityQos.ContextTrackingMode = ClientSecurityQos->ContextTrackingMode; + ClientContext->SecurityQos.EffectiveOnly = ClientSecurityQos->EffectiveOnly; + ClientContext->ServerIsRemote = ServerIsRemote; + ClientContext->ClientToken = NewToken; + return STATUS_SUCCESS; +} + +/* PUBLIC FUNCTIONS ***********************************************************/ /* * @implemented @@ -75,10 +319,21 @@ NTAPI SeLockSubjectContext(IN PSECURITY_SUBJECT_CONTEXT SubjectContext) { - PAGED_CODE(); - + PTOKEN PrimaryToken, ClientToken; + PAGED_CODE(); + + /* Read both tokens */ + PrimaryToken = SubjectContext->PrimaryToken; + ClientToken = SubjectContext->ClientToken; + + /* Always lock the primary */ KeEnterCriticalRegion(); - ExAcquireResourceExclusiveLite(&SepSubjectContextLock, TRUE); + ExAcquireResourceSharedLite(PrimaryToken->TokenLock, TRUE); + + /* Lock the impersonation one if it's there */ + if (!ClientToken) return; + KeEnterCriticalRegion(); + ExAcquireResourceSharedLite(ClientToken->TokenLock, TRUE); } /* @@ -88,10 +343,21 @@ NTAPI SeUnlockSubjectContext(IN PSECURITY_SUBJECT_CONTEXT SubjectContext) { - PAGED_CODE(); - - ExReleaseResourceLite(&SepSubjectContextLock); + PTOKEN PrimaryToken, ClientToken; + PAGED_CODE(); + + /* Read both tokens */ + PrimaryToken = SubjectContext->PrimaryToken; + ClientToken = SubjectContext->ClientToken; + + /* Always unlock the primary one */ + ExReleaseResourceLite(PrimaryToken->TokenLock); KeLeaveCriticalRegion(); + + /* Unlock the impersonation one if it's there */ + if (!ClientToken) return; + ExReleaseResourceLite(ClientToken->TokenLock); + KeLeaveCriticalRegion(); } /* @@ -103,15 +369,13 @@ { PAGED_CODE(); - if (SubjectContext->PrimaryToken != NULL) - { - ObFastDereferenceObject(&PsGetCurrentProcess()->Token, SubjectContext->PrimaryToken); - } - - if (SubjectContext->ClientToken != NULL) - { - ObDereferenceObject(SubjectContext->ClientToken); - } + /* Drop reference on the primary */ + ObFastDereferenceObject(&PsGetCurrentProcess()->Token, SubjectContext->PrimaryToken); + SubjectContext->PrimaryToken = NULL; + + /* Drop reference on the impersonation, if there was one */ + PsDereferenceImpersonationToken(SubjectContext->ClientToken); + SubjectContext->ClientToken = NULL; } /* @@ -128,7 +392,6 @@ { ACCESS_MASK AccessMask = Access; PTOKEN Token; - PAGED_CODE(); /* Map the Generic Acess to Specific Access if we have a Mapping */ @@ -139,6 +402,12 @@ /* Initialize the Access State */ RtlZeroMemory(AccessState, sizeof(ACCESS_STATE)); + ASSERT(AccessState->SecurityDescriptor == NULL); + ASSERT(AccessState->PrivilegesAllocated == FALSE); + + /* Initialize and save aux data */ + RtlZeroMemory(AuxData, sizeof(AUX_ACCESS_DATA)); + AccessState->AuxData = AuxData; /* Capture the Subject Context */ SeCaptureSubjectContextEx(Thread, @@ -146,15 +415,12 @@ &AccessState->SubjectSecurityContext); /* Set Access State Data */ - AccessState->AuxData = AuxData; - AccessState->RemainingDesiredAccess = AccessMask; + AccessState->RemainingDesiredAccess = AccessMask; AccessState->OriginalDesiredAccess = AccessMask; ExpAllocateLocallyUniqueId(&AccessState->OperationID); /* Get the Token to use */ - Token = AccessState->SubjectSecurityContext.ClientToken ? - (PTOKEN)&AccessState->SubjectSecurityContext.ClientToken : - (PTOKEN)&AccessState->SubjectSecurityContext.PrimaryToken; + Token = SeQuerySubjectContextToken(&AccessState->SubjectSecurityContext); /* Check for Travers Privilege */ if (Token->TokenFlags & TOKEN_HAS_TRAVERSE_PRIVILEGE) @@ -202,7 +468,6 @@ SeDeleteAccessState(IN PACCESS_STATE AccessState) { PAUX_ACCESS_DATA AuxData; - PAGED_CODE(); /* Get the Auxiliary Data */ @@ -255,69 +520,36 @@ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; PACCESS_TOKEN Token; NTSTATUS Status; - PACCESS_TOKEN NewToken; - - PAGED_CODE(); - + PAGED_CODE(); + + /* Reference the correct token */ Token = PsReferenceEffectiveToken(Thread, &TokenType, &ThreadEffectiveOnly, &ImpersonationLevel); - if (TokenType != TokenImpersonation) - { - ClientContext->DirectAccessEffectiveOnly = Qos->EffectiveOnly; - } - else - { - if (Qos->ImpersonationLevel > ImpersonationLevel) - { - if (Token) ObDereferenceObject(Token); - return STATUS_BAD_IMPERSONATION_LEVEL; - } - - if ((ImpersonationLevel == SecurityAnonymous) || - (ImpersonationLevel == SecurityIdentification) || - ((RemoteClient) && (ImpersonationLevel != SecurityDelegation))) - { - if (Token) ObDereferenceObject(Token); - return STATUS_BAD_IMPERSONATION_LEVEL; - } - - ClientContext->DirectAccessEffectiveOnly = ((ThreadEffectiveOnly) || - (Qos->EffectiveOnly)) ? TRUE : FALSE; - } - - if (Qos->ContextTrackingMode == SECURITY_STATIC_TRACKING) - { - ClientContext->DirectlyAccessClientToken = FALSE; - Status = SeCopyClientToken(Token, ImpersonationLevel, 0, &NewToken); - if (!NT_SUCCESS(Status)) return Status; - } - else - { - ClientContext->DirectlyAccessClientToken = TRUE; - if (RemoteClient != FALSE) - { -#if 0 - SeGetTokenControlInformation(Token, - &ClientContext->ClientTokenControl); -#endif - } - - NewToken = Token; - } - - ClientContext->SecurityQos.Length = sizeof(SECURITY_QUALITY_OF_SERVICE); - ClientContext->SecurityQos.ImpersonationLevel = Qos->ImpersonationLevel; - ClientContext->SecurityQos.ContextTrackingMode = Qos->ContextTrackingMode; - ClientContext->SecurityQos.EffectiveOnly = Qos->EffectiveOnly; - ClientContext->ServerIsRemote = RemoteClient; - ClientContext->ClientToken = NewToken; - return STATUS_SUCCESS; -} - -/* - * @unimplemented + + /* Create client security from it */ + Status = SepCreateClientSecurity(Token, + Qos, + RemoteClient, + TokenType, + ThreadEffectiveOnly, + ImpersonationLevel, + ClientContext); + + /* Check if we failed or static tracking was used */ + if (!(NT_SUCCESS(Status)) || (Qos->ContextTrackingMode == SECURITY_STATIC_TRACKING)) + { + /* Dereference our copy since it's not being used */ + ObDereferenceObject(Token); + } + + /* Return status */ + return Status; +} + +/* + * @implemented */ NTSTATUS NTAPI @@ -326,8 +558,34 @@ IN BOOLEAN ServerIsRemote, OUT PSECURITY_CLIENT_CONTEXT ClientContext) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + PACCESS_TOKEN Token; + NTSTATUS Status; + PAGED_CODE(); + + /* Get the right token and reference it */ + Token = SeQuerySubjectContextToken(SubjectContext); + ObReferenceObject(Token); + + /* Create the context */ + Status = SepCreateClientSecurity(Token, + ClientSecurityQos, + ServerIsRemote, + SubjectContext->ClientToken ? + TokenImpersonation : TokenPrimary, + FALSE, + SubjectContext->ImpersonationLevel, + ClientContext); + + /* Check if we failed or static tracking was used */ + if (!(NT_SUCCESS(Status)) || + (ClientSecurityQos->ContextTrackingMode == SECURITY_STATIC_TRACKING)) + { + /* Dereference our copy since it's not being used */ + ObDereferenceObject(Token); + } + + /* Return status */ + return Status; } /* @@ -339,23 +597,24 @@ IN PETHREAD ServerThread OPTIONAL) { BOOLEAN EffectiveOnly; - - PAGED_CODE(); - - if (ClientContext->DirectlyAccessClientToken == FALSE) - { + PAGED_CODE(); + + /* Check if direct access is requested */ + if (!ClientContext->DirectlyAccessClientToken) + { + /* No, so get the flag from QOS */ EffectiveOnly = ClientContext->SecurityQos.EffectiveOnly; } else { + /* Yes, so see if direct access should be effective only */ EffectiveOnly = ClientContext->DirectAccessEffectiveOnly; } - if (ServerThread == NULL) - { - ServerThread = PsGetCurrentThread(); - } - + /* Use the current thread if one was not passed */ + if (!ServerThread) ServerThread = PsGetCurrentThread(); + + /* Call the lower layer routine */ return PsImpersonateClient(ServerThread, ClientContext->ClientToken, TRUE, @@ -373,8 +632,8 @@ { PAGED_CODE(); - SeImpersonateClientEx(ClientContext, - ServerThread); + /* Call the new API */ + SeImpersonateClientEx(ClientContext, ServerThread); } /* EOF */ Modified: trunk/reactos/ntoskrnl/se/sd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sd.c?rev=57261…
============================================================================== --- trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] Mon Sep 10 08:15:43 2012 @@ -27,82 +27,6 @@ PSECURITY_DESCRIPTOR SeUnrestrictedSd = NULL; /* PRIVATE FUNCTIONS **********************************************************/ - -PSID -FORCEINLINE -SepGetGroupFromDescriptor(PVOID _Descriptor) -{ - PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; - PISECURITY_DESCRIPTOR_RELATIVE SdRel; - - if (Descriptor->Control & SE_SELF_RELATIVE) - { - SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; - if (!SdRel->Group) return NULL; - return (PSID)((ULONG_PTR)Descriptor + SdRel->Group); - } - else - { - return Descriptor->Group; - } -} - -PSID -FORCEINLINE -SepGetOwnerFromDescriptor(PVOID _Descriptor) -{ - PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; - PISECURITY_DESCRIPTOR_RELATIVE SdRel; - - if (Descriptor->Control & SE_SELF_RELATIVE) - { - SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; - if (!SdRel->Owner) return NULL; - return (PSID)((ULONG_PTR)Descriptor + SdRel->Owner); - } - else - { - return Descriptor->Owner; - } -} - -PACL -FORCEINLINE -SepGetDaclFromDescriptor(PVOID _Descriptor) -{ - PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; - PISECURITY_DESCRIPTOR_RELATIVE SdRel; - - if (Descriptor->Control & SE_SELF_RELATIVE) - { - SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; - if (!SdRel->Dacl) return NULL; - return (PACL)((ULONG_PTR)Descriptor + SdRel->Dacl); - } - else - { - return Descriptor->Dacl; - } -} - -PACL -FORCEINLINE -SepGetSaclFromDescriptor(PVOID _Descriptor) -{ - PISECURITY_DESCRIPTOR Descriptor = (PISECURITY_DESCRIPTOR)_Descriptor; - PISECURITY_DESCRIPTOR_RELATIVE SdRel; - - if (Descriptor->Control & SE_SELF_RELATIVE) - { - SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; - if (!SdRel->Sacl) return NULL; - return (PACL)((ULONG_PTR)Descriptor + SdRel->Sacl); - } - else - { - return Descriptor->Sacl; - } -} BOOLEAN INIT_FUNCTION Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=57…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] Mon Sep 10 08:15:43 2012 @@ -286,65 +286,6 @@ return STATUS_SUCCESS; } -static BOOLEAN -SepSidInToken(PACCESS_TOKEN _Token, - PSID Sid) -{ - ULONG i; - PTOKEN Token = (PTOKEN)_Token; - - PAGED_CODE(); - - SidInTokenCalls++; - if (!(SidInTokenCalls % 10000)) DPRINT1("SidInToken Calls: %d\n", SidInTokenCalls); - - if (Token->UserAndGroupCount == 0) - { - return FALSE; - } - - for (i=0; i<Token->UserAndGroupCount; i++) - { - if (RtlEqualSid(Sid, Token->UserAndGroups[i].Sid)) - { - if ((i == 0)|| (Token->UserAndGroups[i].Attributes & SE_GROUP_ENABLED)) - { - return TRUE; - } - - return FALSE; - } - } - - return FALSE; -} - -static BOOLEAN -SepTokenIsOwner(PACCESS_TOKEN Token, - PSECURITY_DESCRIPTOR SecurityDescriptor) -{ - NTSTATUS Status; - PSID Sid = NULL; - BOOLEAN Defaulted; - - Status = RtlGetOwnerSecurityDescriptor(SecurityDescriptor, - &Sid, - &Defaulted); - if (!NT_SUCCESS(Status)) - { - DPRINT1("RtlGetOwnerSecurityDescriptor() failed (Status %lx)\n", Status); - return FALSE; - } - - if (Sid == NULL) - { - DPRINT1("Owner Sid is NULL\n"); - return FALSE; - } - - return SepSidInToken(Token, Sid); -} - VOID NTAPI SeQuerySecurityAccessMask(IN SECURITY_INFORMATION SecurityInformation, @@ -840,7 +781,8 @@ SubjectSecurityContext->ClientToken : SubjectSecurityContext->PrimaryToken; if (SepTokenIsOwner(Token, - SecurityDescriptor)) + SecurityDescriptor, + FALSE)) { if (DesiredAccess & MAXIMUM_ALLOWED) PreviouslyGrantedAccess |= (WRITE_DAC | READ_CONTROL); @@ -1007,16 +949,16 @@ } /* Set up the subject context, and lock it */ - SubjectSecurityContext.ClientToken = Token; - SubjectSecurityContext.ImpersonationLevel = Token->ImpersonationLevel; - SubjectSecurityContext.PrimaryToken = NULL; - SubjectSecurityContext.ProcessAuditId = NULL; - SeLockSubjectContext(&SubjectSecurityContext); + SeCaptureSubjectContext(&SubjectSecurityContext); + + /* Lock the token */ + KeEnterCriticalRegion(); + ExAcquireResourceSharedLite(Token->TokenLock, TRUE); /* Check if the token is the owner and grant WRITE_DAC and READ_CONTROL rights */ if (DesiredAccess & (WRITE_DAC | READ_CONTROL | MAXIMUM_ALLOWED)) { - if (SepTokenIsOwner(Token, SecurityDescriptor)) // FIXME: use CapturedSecurityDescriptor + if (SepTokenIsOwner(Token, SecurityDescriptor, FALSE)) // FIXME: use CapturedSecurityDescriptor { if (DesiredAccess & MAXIMUM_ALLOWED) PreviouslyGrantedAccess |= (WRITE_DAC | READ_CONTROL); @@ -1046,8 +988,10 @@ AccessStatus); } - /* Unlock subject context */ - SeUnlockSubjectContext(&SubjectSecurityContext); + /* Release subject context and unlock the token */ + SeReleaseSubjectContext(&SubjectSecurityContext); + ExReleaseResourceLite(Token->TokenLock); + KeLeaveCriticalRegion(); /* Release the captured security descriptor */ SeReleaseSecurityDescriptor(CapturedSecurityDescriptor,
12 years, 3 months
1
0
0
0
[akhaldi] 57260: [CMAKE] * Refer to the PSEH lib using its variable.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 9 23:59:16 2012 New Revision: 57260 URL:
http://svn.reactos.org/svn/reactos?rev=57260&view=rev
Log: [CMAKE] * Refer to the PSEH lib using its variable. Modified: trunk/reactos/base/services/eventlog/CMakeLists.txt trunk/reactos/base/services/wlansvc/CMakeLists.txt trunk/reactos/base/system/services/CMakeLists.txt trunk/reactos/base/system/smss/CMakeLists.txt Modified: trunk/reactos/base/services/eventlog/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/CMa…
============================================================================== --- trunk/reactos/base/services/eventlog/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/CMakeLists.txt [iso-8859-1] Sun Sep 9 23:59:16 2012 @@ -17,7 +17,7 @@ add_executable(eventlog ${SOURCE}) if(NOT MSVC) - target_link_libraries(eventlog pseh) + target_link_libraries(eventlog ${PSEH_LIB}) endif() set_module_type(eventlog win32cui UNICODE) Modified: trunk/reactos/base/services/wlansvc/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/wlansvc/CMak…
============================================================================== --- trunk/reactos/base/services/wlansvc/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/services/wlansvc/CMakeLists.txt [iso-8859-1] Sun Sep 9 23:59:16 2012 @@ -10,7 +10,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/wlansvc_s.c) if(NOT MSVC) - target_link_libraries(wlansvc pseh) + target_link_libraries(wlansvc ${PSEH_LIB}) endif() set_module_type(wlansvc win32cui UNICODE) Modified: trunk/reactos/base/system/services/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/CMake…
============================================================================== --- trunk/reactos/base/system/services/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/system/services/CMakeLists.txt [iso-8859-1] Sun Sep 9 23:59:16 2012 @@ -22,7 +22,7 @@ add_executable(services ${SOURCE}) if(NOT MSVC) - target_link_libraries(services pseh) + target_link_libraries(services ${PSEH_LIB}) endif() set_module_type(services win32cui UNICODE) Modified: trunk/reactos/base/system/smss/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/CMakeList…
============================================================================== --- trunk/reactos/base/system/smss/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/system/smss/CMakeLists.txt [iso-8859-1] Sun Sep 9 23:59:16 2012 @@ -2,23 +2,20 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) list(APPEND SOURCE - crashdmp.c - pagefile.c - sminit.c - smloop.c - smsbapi.c - smsessn.c - smsubsys.c - smutil.c - smss.c - smss.rc) + crashdmp.c + pagefile.c + sminit.c + smloop.c + smsbapi.c + smsessn.c + smsubsys.c + smutil.c + smss.c + smss.rc) add_executable(smss WIN32 ${SOURCE}) - -target_link_libraries(smss nt pseh smlib) - +target_link_libraries(smss nt ${PSEH_LIB} smlib) add_pch(smss smss.h) - set_module_type(smss nativecui) add_importlibs(smss ntdll) add_cd_file(TARGET smss DESTINATION reactos/system32 FOR all)
12 years, 3 months
1
0
0
0
[tkreuzer] 57259: [PSEH3] Implement PSEH 3.0. Currently disabled by default. Dedicated to Amine Khaldi.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Sep 9 21:12:00 2012 New Revision: 57259 URL:
http://svn.reactos.org/svn/reactos?rev=57259&view=rev
Log: [PSEH3] Implement PSEH 3.0. Currently disabled by default. Dedicated to Amine Khaldi. Added: trunk/reactos/include/reactos/libs/pseh/pseh3.h (with props) trunk/reactos/lib/pseh/i386/pseh3.c (with props) trunk/reactos/lib/pseh/i386/pseh3_asmdef.h (with props) trunk/reactos/lib/pseh/i386/pseh3_i386.S (with props) Modified: trunk/reactos/CMakeLists.txt trunk/reactos/cmake/config.cmake trunk/reactos/include/reactos/libs/pseh/pseh2.h trunk/reactos/lib/pseh/CMakeLists.txt Modified: trunk/reactos/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeLists.txt?rev=57259&r…
============================================================================== --- trunk/reactos/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/CMakeLists.txt [iso-8859-1] Sun Sep 9 21:12:00 2012 @@ -120,6 +120,10 @@ if(_WINKD_) add_definitions(-D_WINKD_=1) + endif() + + if(USE_PSEH3) + add_definitions(-D_USE_PSEH3=1) endif() # Version Options Modified: trunk/reactos/cmake/config.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/config.cmake?rev=572…
============================================================================== --- trunk/reactos/cmake/config.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/config.cmake [iso-8859-1] Sun Sep 9 21:12:00 2012 @@ -44,7 +44,7 @@ else() set(_WINKD_ TRUE CACHE BOOL "Whether to compile with the KD protocol.") endif() - + else() set(KDBG TRUE CACHE BOOL "Whether to compile in the integrated kernel debugger.") @@ -75,4 +75,9 @@ set(_VS_ANALYZE_ FALSE CACHE BOOL "Whether to enable static analysis while compiling.") +else() + +set(USE_PSEH3 FALSE CACHE BOOL +"Whether to use the new PSEH3 library (requires GCC 4.5 and newer).") + endif() Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
============================================================================== --- trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] Sun Sep 9 21:12:00 2012 @@ -23,7 +23,7 @@ #ifndef KJK_PSEH2_H_ #define KJK_PSEH2_H_ -#if defined(USE_NATIVE_SEH) || defined(_MSC_VER) +#if defined(_USE_NATIVE_SEH) || defined(_MSC_VER) #include <excpt.h> #define _SEH2_TRY __try @@ -36,7 +36,7 @@ #define _SEH2_YIELD(STMT_) STMT_ #define _SEH2_LEAVE __leave -#elif defined(USE_DUMMY_PSEH) || defined (__arm__) || defined(__clang__) || defined(_M_AMD64) +#elif defined(_USE_DUMMY_PSEH) || defined (__arm__) || defined(__clang__) || defined(_M_AMD64) #define _SEH2_TRY { #define _SEH2_FINALLY } { @@ -47,6 +47,21 @@ #define _SEH2_AbnormalTermination() #define _SEH2_YIELD(STMT_) STMT_ #define _SEH2_LEAVE + +#elif defined(_USE_PSEH3) + +#include "pseh3.h" + +/* Compatibility macros */ +#define _SEH2_TRY _SEH3_TRY +#define _SEH2_EXCEPT _SEH3_EXCEPT +#define _SEH2_FINALLY _SEH3_FINALLY +#define _SEH2_END _SEH3_END +#define _SEH2_GetExceptionInformation() ((struct _EXCEPTION_POINTERS*)_exception_info()) +#define _SEH2_GetExceptionCode _exception_code +#define _SEH2_AbnormalTermination _abnormal_termination +#define _SEH2_LEAVE _SEH3_LEAVE +#define _SEH2_YIELD(x) x #elif defined(__GNUC__) Added: trunk/reactos/include/reactos/libs/pseh/pseh3.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
============================================================================== --- trunk/reactos/include/reactos/libs/pseh/pseh3.h (added) +++ trunk/reactos/include/reactos/libs/pseh/pseh3.h [iso-8859-1] Sun Sep 9 21:12:00 2012 @@ -1,0 +1,292 @@ +/* + * PROJECT: ReactOS system libraries + * LICENSE: GNU GPL - See COPYING in the top level directory + * PURPOSE: Header for PSEH3 + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* For additional information see pseh3.c in the related library. */ + +#pragma once +#define _PSEH3_H_ + +#include "excpt.h" + +typedef struct _SEH3$_SCOPE_TABLE +{ + void *Target; + void *Filter; +} SEH3$_SCOPE_TABLE, *PSEH3$_SCOPE_TABLE; + +typedef struct _SEH3$_EXCEPTION_POINTERS +{ + struct _EXCEPTION_RECORD *ExceptionRecord; + struct _CONTEXT *ContextRecord; +} SEH3$_EXCEPTION_POINTERS, *PSEH3$_EXCEPTION_POINTERS; + +typedef struct _SEH3$_REGISTRATION_FRAME +{ + /* First the Windows base record. Don't move this! */ + struct _SEH3$_REGISTRATION_FRAME *Next; + void *Handler; + + /* Points to the end of the internal registration chain */ + struct _SEH3$_REGISTRATION_FRAME *EndOfChain; + + /* Pointer to the static scope table */ + PSEH3$_SCOPE_TABLE ScopeTable; + + /* Except handler stores pointer to exception pointers here */ + PSEH3$_EXCEPTION_POINTERS volatile ExceptionPointers; + + /* Registers that we need to save */ + unsigned long Esp; + unsigned long Ebp; + +} SEH3$_REGISTRATION_FRAME ,*PSEH3$_REGISTRATION_FRAME; + +extern inline __attribute__((always_inline,gnu_inline)) +void _SEH3$_UnregisterFrame(volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame) +{ + asm volatile ("movl %k[NewHead], %%fs:0" + : : [NewHead] "ir" (RegistrationFrame->Next) : "memory"); +} + +extern inline __attribute__((always_inline,gnu_inline)) +void _SEH3$_UnregisterTryLevel( + volatile SEH3$_REGISTRATION_FRAME *TrylevelFrame) +{ + volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame; + asm volatile ("movl %%fs:0, %k[RegistrationFrame]" + : [RegistrationFrame] "=r" (RegistrationFrame) : ); + RegistrationFrame->EndOfChain = TrylevelFrame->Next; +} + +enum +{ + _SEH3$_TryLevel = 0, +}; + +/* These are global dummy definitions, that get overwritten in the local context of __finally / __except blocks */ +int __cdecl __attribute__((error ("Can only be used inside a __finally block."))) _abnormal_termination(void); +unsigned long __cdecl __attribute__((error("Can only be used inside an exception filter or __except block."))) _exception_code(void); +void * __cdecl __attribute__((error("Can only be used inside an exception filter."))) _exception_info(void); + +/* Define the registers that get clobbered, when reaching the __except block. + We specify ebp on optimized builds without frame pointer, since it will be + used by GCC as a general purpose register then. */ +#if defined(__OPTIMIZE__) && defined(_ALLOW_OMIT_FRAME_POINTER) +#define _SEH3$_CLOBBER_ON_EXCEPTION "ebp", "ebx", "ecx", "edx", "esi", "edi", "flags", "memory" +#else +#define _SEH3$_CLOBBER_ON_EXCEPTION "ebx", "ecx", "edx", "esi", "edi", "flags", "memory" +#endif + +/* This attribute allows automatic cleanup of the registered frames */ +#define _SEH3$_AUTO_CLEANUP __attribute__((cleanup(_SEH3$_AutoCleanup))) + +#define _SEH3$_ASM_GOTO(_Asm, _Label, ...) asm goto (_Asm : : : "memory", ## __VA_ARGS__ : _Label) + +#define _SEH3$_DECLARE_EXCEPT_INTRINSICS() \ + inline __attribute__((always_inline, gnu_inline)) \ + unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionPointers->ExceptionRecord->ExceptionCode; } \ + +/* This is an asm wrapper around _SEH3$_RegisterFrame */ +#define _SEH3$_RegisterFrame(_TrylevelFrame, _DataTable, _Target) \ + asm goto ("call __SEH3$_RegisterFrame\n" \ + : \ + : "c" (_TrylevelFrame), "a" (_DataTable) \ + : "edx", "memory" \ + : _Target) + +/* This is an asm wrapper around _SEH3$_EnterTryLevel */ +#define _SEH3$_RegisterTryLevel(_TrylevelFrame, _DataTable, _Target) \ + asm goto ("call __SEH3$_RegisterTryLevel\n" \ + : \ + : "c" (_TrylevelFrame), "a" (_DataTable) \ + : "edx", "memory" \ + : _Target) + +/* On GCC the filter function is a nested function with __fastcall calling + convention. The eax register contains a base address the function uses + to address the callers stack frame. __fastcall is chosen, because it gives + us an effective was of passing one argument to the function, that we need + to tell the function in a first pass to return informtion about the frame + base address. Since this is something GCC chooses arbitrarily, we call + the function with an arbitrary base address in eax first and then use the + result to calculate the correct address for a second call to the function. */ +#define _SEH3$_DECLARE_FILTER_FUNC(_Name) \ + auto int __fastcall _Name(int Action) + +#define _SEH3$_NESTED_FUNC_OPEN(_Name) \ + int __fastcall _Name(int Action) \ + { \ + /* This is a fancy way to get information about the frame layout */ \ + if (Action == 0) return (int)&_SEH3$_TrylevelFrame; + +#define _SEH3$_DEFINE_FILTER_FUNC(_Name, expression) \ + _SEH3$_NESTED_FUNC_OPEN(_Name) \ + /* Declare the intrinsics for exception filters */ \ + inline __attribute__((always_inline, gnu_inline)) \ + unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionPointers->ExceptionRecord->ExceptionCode; } \ + inline __attribute__((always_inline, gnu_inline)) \ + void * _exception_info() { return _SEH3$_TrylevelFrame.ExceptionPointers; } \ +\ + /* Now handle the actual filter expression */ \ + return (expression); \ + } + +#define _SEH3$_FINALLY_FUNC_OPEN(_Name) \ + _SEH3$_NESTED_FUNC_OPEN(_Name) \ + /* Declare the intrinsics for the finally function */ \ + inline __attribute__((always_inline, gnu_inline)) \ + int _abnormal_termination() { return (_SEH3$_TrylevelFrame.ScopeTable != 0); } \ + +#define _SEH3$_FILTER(_Filter, _FilterExpression) \ + (__builtin_constant_p(_FilterExpression) ? (void*)(unsigned long)(unsigned char)(unsigned long)(_FilterExpression) : _Filter) + +#define _SEH3$_DEFINE_DUMMY_FINALLY(_Name) \ + auto inline __attribute__((always_inline,gnu_inline)) int _Name(int Action) { return 0; } + +#define _SEH3$_DECLARE_CLEANUP_FUNC(_Name) \ + auto inline __attribute__((always_inline,gnu_inline)) void _Name(volatile SEH3$_REGISTRATION_FRAME *p) + +#define _SEH3$_DEFINE_CLEANUP_FUNC(_Name) \ + _SEH3$_DECLARE_CLEANUP_FUNC(_Name) \ + { \ + /* Unregister the frame */ \ + if (_SEH3$_TryLevel == 1) _SEH3$_UnregisterFrame(&_SEH3$_TrylevelFrame); \ + else _SEH3$_UnregisterTryLevel(&_SEH3$_TrylevelFrame); \ +\ + /* Invoke the finally function (an inline dummy in the __except case) */ \ + _SEH3$_FinallyFunction(1); \ + } + +/* This construct scares GCC so much, that it will stop moving code + around into places that are never executed. */ +#define _SEH3$_SCARE_GCC() \ + void *plabel; \ + _SEH3$_ASM_GOTO("#\n", _SEH3$_l_HandlerTarget); \ + asm volatile ("#" : "=a"(plabel) : "p"(&&_SEH3$_l_BeforeTry), "p"(&&_SEH3$_l_HandlerTarget), "p"(&&_SEH3$_l_OnException) \ + : _SEH3$_CLOBBER_ON_EXCEPTION ); \ + goto *plabel; + + +#define _SEH3_TRY \ + /* Enter the outer scope */ \ + do { \ + /* Declare local labels */ \ + __label__ _SEH3$_l_BeforeTry; \ + __label__ _SEH3$_l_DoTry; \ + __label__ _SEH3$_l_AfterTry; \ + __label__ _SEH3$_l_EndTry; \ + __label__ _SEH3$_l_HandlerTarget; \ + __label__ _SEH3$_l_OnException; \ +\ + /* Count the try level. Outside of any __try, _SEH3$_TryLevel is 0 */ \ + enum { \ + _SEH3$_PreviousTryLevel = _SEH3$_TryLevel, \ + _SEH3$_TryLevel = _SEH3$_PreviousTryLevel + 1, \ + }; \ +\ + /* Forward declaration of the auto cleanup function */ \ + _SEH3$_DECLARE_CLEANUP_FUNC(_SEH3$_AutoCleanup); \ +\ + /* Allocate a registration frame */ \ + volatile SEH3$_REGISTRATION_FRAME _SEH3$_AUTO_CLEANUP _SEH3$_TrylevelFrame; \ +\ + goto _SEH3$_l_BeforeTry; \ + /* Silence warning */ goto _SEH3$_l_AfterTry; \ +\ + _SEH3$_l_DoTry: \ + do + + +#define _SEH3_EXCEPT(...) \ + /* End the try block */ \ + while (0); \ + _SEH3$_l_AfterTry: (void)0; \ + goto _SEH3$_l_EndTry; \ +\ + _SEH3$_l_BeforeTry: (void)0; \ + _SEH3$_ASM_GOTO("#\n", _SEH3$_l_OnException); \ +\ + /* Forward declaration of the filter function */ \ + _SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FilterFunction); \ +\ + /* Create a static data table that contains the jump target and filter function */ \ + static const SEH3$_SCOPE_TABLE _SEH3$_ScopeTable = { &&_SEH3$_l_HandlerTarget, _SEH3$_FILTER(&_SEH3$_FilterFunction, (__VA_ARGS__)) }; \ +\ + /* Register the registration record. */ \ + if (_SEH3$_TryLevel == 1) _SEH3$_RegisterFrame(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable, _SEH3$_l_HandlerTarget); \ + else _SEH3$_RegisterTryLevel(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable, _SEH3$_l_HandlerTarget); \ +\ + /* Emit the filter function */ \ + _SEH3$_DEFINE_FILTER_FUNC(_SEH3$_FilterFunction, (__VA_ARGS__)) \ +\ + /* Define an empty inline finally function */ \ + _SEH3$_DEFINE_DUMMY_FINALLY(_SEH3$_FinallyFunction) \ +\ + /* Allow intrinsics for __except to be used */ \ + _SEH3$_DECLARE_EXCEPT_INTRINSICS() \ +\ + goto _SEH3$_l_DoTry; \ +\ + _SEH3$_l_HandlerTarget: (void)0; \ +\ + if (1) \ + { \ + do + + +#define _SEH3_FINALLY \ + /* End the try block */ \ + while (0); \ + _SEH3$_l_AfterTry: (void)0; \ + /* Set ScopeTable to 0, this is used by _abnormal_termination() */ \ + _SEH3$_TrylevelFrame.ScopeTable = 0; \ +\ + goto _SEH3$_l_EndTry; \ +\ + _SEH3$_l_BeforeTry: (void)0; \ + _SEH3$_ASM_GOTO("#\n", _SEH3$_l_OnException); \ +\ + /* Forward declaration of the finally function */ \ + _SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FinallyFunction); \ +\ + /* Create a static data table that contains the finally function */ \ + static const SEH3$_SCOPE_TABLE _SEH3$_ScopeTable = { 0, &_SEH3$_FinallyFunction }; \ +\ + /* Register the registration record. */ \ + if (_SEH3$_TryLevel == 1) _SEH3$_RegisterFrame(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable, _SEH3$_l_HandlerTarget); \ + else _SEH3$_RegisterTryLevel(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable, _SEH3$_l_HandlerTarget); \ +\ + goto _SEH3$_l_DoTry; \ +\ + _SEH3$_l_HandlerTarget: (void)0; \ +\ + _SEH3$_FINALLY_FUNC_OPEN(_SEH3$_FinallyFunction) \ + /* This construct makes sure that the finally function returns */ \ + /* a proper value at the end */ \ + for (; ; (void)({return 0; 0;})) + + +#define _SEH3_END \ + while (0); \ + }; \ + goto _SEH3$_l_EndTry; \ +\ + _SEH3$_l_OnException: (void)0; \ + /* Force GCC to create proper code pathes */ \ + _SEH3$_SCARE_GCC() \ +\ + _SEH3$_l_EndTry:(void)0; \ + _SEH3$_ASM_GOTO("#\n", _SEH3$_l_OnException); \ +\ + /* Implementation of the auto cleanup function */ \ + _SEH3$_DEFINE_CLEANUP_FUNC(_SEH3$_AutoCleanup); \ +\ + /* Close the outer scope */ \ + } while (0); + +#define _SEH3_LEAVE goto _SEH3$_l_AfterTry + Propchange: trunk/reactos/include/reactos/libs/pseh/pseh3.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/lib/pseh/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/CMakeLists.txt?re…
============================================================================== --- trunk/reactos/lib/pseh/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/lib/pseh/CMakeLists.txt [iso-8859-1] Sun Sep 9 21:12:00 2012 @@ -1,8 +1,12 @@ if(NOT MSVC) - list(APPEND SOURCE framebased.c) - if(ARCH STREQUAL "i386") + if (USE_PSEH3) + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/pseh) + list(APPEND SOURCE + i386/pseh3.c + i386/pseh3_i386.S) + elseif(ARCH STREQUAL "i386") list(APPEND SOURCE i386/framebased.S i386/framebased-gcchack.c Added: trunk/reactos/lib/pseh/i386/pseh3.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/pseh3.c?rev=…
============================================================================== --- trunk/reactos/lib/pseh/i386/pseh3.c (added) +++ trunk/reactos/lib/pseh/i386/pseh3.c [iso-8859-1] Sun Sep 9 21:12:00 2012 @@ -1,0 +1,275 @@ +/* + * PROJECT: ReactOS system libraries + * LICENSE: GNU GPL - See COPYING in the top level directory + * PURPOSE: Support library for PSEH3 + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* + * - Naming: To avoid naming conflicts, all internal identifiers are prefixed + * with _SEH3$_. + * - Frame graph: PSEH3 uses the same registration frame for every trylevel. + * Only the top trylevel is registered in FS:0, the inner trylevels are linked + * to the first trylevel frame. Only the first trylevel frame has the Handler + * member set, it's 0 for all others as an identification. The EndOfChain + * member of the FS:0 registered frame points to the last internal frame, + * which is the frame itself, when only 1 trylevel is present. + * + * The registration graph looks like this: + * + * newer handlers + * ----------------> + * + * fs:0 /----------------\ + * |-----------|<-\ |-----------|<-\ / |----------|<-\ \->|----------| + * | <Next> | \-| <Next> | \--/--| <Next> | \---| <Next> | + * | <Handler> | | <Handler> | / | <NULL> | | <NULL> | + * |-----------| |-----------| / |----------| |----------| + * |EndOfChain |---/ + * | ... | + * |-----------| + */ + +#include <stdarg.h> +#include <windef.h> +#include <winnt.h> + +#include "pseh3.h" +#include "pseh3_asmdef.h" + +/* Make sure the asm definitions match the structures */ +C_ASSERT(SEH3_REGISTRATION_FRAME_Next == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, Next)); +C_ASSERT(SEH3_REGISTRATION_FRAME_Handler == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, Handler)); +C_ASSERT(SEH3_REGISTRATION_FRAME_EndOfChain == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, EndOfChain)); +C_ASSERT(SEH3_REGISTRATION_FRAME_ScopeTable == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, ScopeTable)); +C_ASSERT(SEH3_REGISTRATION_FRAME_ExceptionPointers == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, ExceptionPointers)); +C_ASSERT(SEH3_REGISTRATION_FRAME_Esp == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, Esp)); +C_ASSERT(SEH3_REGISTRATION_FRAME_Ebp == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, Ebp)); +C_ASSERT(SEH3_SCOPE_TABLE_Filter == FIELD_OFFSET(SEH3$_SCOPE_TABLE, Filter)); +C_ASSERT(SEH3_SCOPE_TABLE_Target == FIELD_OFFSET(SEH3$_SCOPE_TABLE, Target)); + +static inline +void _SEH3$_Unregister( + volatile SEH3$_REGISTRATION_FRAME *Frame) +{ + if (Frame->Handler) + _SEH3$_UnregisterFrame(Frame); + else + _SEH3$_UnregisterTryLevel(Frame); +} + +static inline +LONG +_SEH3$_InvokeFilter( + PVOID Record, + PVOID Filter) +{ + LONG FilterResult; + + asm volatile ( + /* First call with param = 0 to get the frame layout */ + "xorl %%ecx, %%ecx\n\t" + "xorl %%eax, %%eax\n\t" + "call *%[Filter]\n\t" + + /* The result is the frame base address that we passed in (0) plus the + offset to the registration record. */ + "negl %%eax\n\t" + "addl %[Record], %%eax\n\t" + + /* Second call to get the filter result */ + "mov $1, %%ecx\n\t" + "call *%[Filter]\n\t" + : "=a"(FilterResult) + : [Record] "m" (Record), [Filter] "m" (Filter) + : "ecx", "edx"); + + return FilterResult; +} + +static inline +LONG +_SEH3$_GetFilterResult( + PSEH3$_REGISTRATION_FRAME Record) +{ + PVOID Filter = Record->ScopeTable->Filter; + LONG Result; + + if (Record->ScopeTable->Target == NULL) + { + return EXCEPTION_CONTINUE_SEARCH; + } + + /* Check if we have a constant filter */ + if (((ULONG)Filter & 0xFFFFFF00) == 0) + { + /* Lowest 8 bit are sign extended to give the result */ + Result = (LONG)(CHAR)(ULONG)Filter; + } + else + { + /* Call the filter function */ + Result = _SEH3$_InvokeFilter(Record, Filter); + } + + /* Normalize the result */ + if (Result < 0) return EXCEPTION_CONTINUE_EXECUTION; + else if (Result > 0) return EXCEPTION_EXECUTE_HANDLER; + else return EXCEPTION_CONTINUE_SEARCH; +} + +static inline +VOID +_SEH3$_CallFinally( + PSEH3$_REGISTRATION_FRAME Record) +{ + _SEH3$_InvokeFilter(Record, Record->ScopeTable->Filter); +} + +__attribute__((noreturn)) +static inline +void +_SEH3$_JumpToTarget( + PSEH3$_REGISTRATION_FRAME RegistrationFrame) +{ + asm volatile ( + /* Load the registers */ + "movl 20(%%ecx), %%esp\n" + "movl 24(%%ecx), %%ebp\n" + + /* Stack pointer is 4 off from the call to __SEH3$_RegisterFrame */ + "addl $4, %%esp\n" + + /* Jump into the exception handler */ + "jmp *%[Target]\n" + : : + "c" (RegistrationFrame), + "a" (RegistrationFrame->ScopeTable), + [Target] "m" (RegistrationFrame->ScopeTable->Target) + ); + + __builtin_unreachable(); +} + +static inline +void +_SEH3$_CallRtlUnwind( + PSEH3$_REGISTRATION_FRAME RegistrationFrame) +{ + LONG ClobberedEax; + + asm volatile( + "push %%ebp\n" + "push $0\n" + "push $0\n" + "push $0\n" + "push %[TargetFrame]\n" + "call _RtlUnwind@16\n" + "pop %%ebp\n" + : "=a" (ClobberedEax) + : [TargetFrame] "a" (RegistrationFrame) + : "ebx", "ecx", "edx", "esi", + "edi", "flags", "memory"); +} + +EXCEPTION_DISPOSITION +__cdecl +__attribute__ ((__target__ ("cld"))) +_SEH3$_except_handler( + struct _EXCEPTION_RECORD * ExceptionRecord, + PSEH3$_REGISTRATION_FRAME EstablisherFrame, + struct _CONTEXT * ContextRecord, + void * DispatcherContext) +{ + PSEH3$_REGISTRATION_FRAME CurrentFrame, TargetFrame; + SEH3$_EXCEPTION_POINTERS ExceptionPointers; + LONG FilterResult; + + /* Clear the direction flag. */ + asm volatile ("cld\n" : : : "memory"); + + /* Check if this is an unwind */ + if (ExceptionRecord->ExceptionFlags & EXCEPTION_UNWIND) + { + /* Unwind all local frames */ + TargetFrame = EstablisherFrame->Next; + } + else + { + /* Save the exception pointers on the stack */ + ExceptionPointers.ExceptionRecord = ExceptionRecord; + ExceptionPointers.ContextRecord = ContextRecord; + + /* Loop all frames for this registration */ + CurrentFrame = EstablisherFrame->EndOfChain; + for (;;) + { + /* Check if we have an exception handler */ + if (CurrentFrame->ScopeTable->Target != NULL) + { + /* Set exception pointers for this frame */ + CurrentFrame->ExceptionPointers = &ExceptionPointers; + + /* Get the filter result */ + FilterResult = _SEH3$_GetFilterResult(CurrentFrame); + + /* Check, if continuuing is requested */ + if (FilterResult == EXCEPTION_CONTINUE_EXECUTION) + { + return ExceptionContinueExecution; + } + + /* Check if the except handler shall be executed */ + if (FilterResult == EXCEPTION_EXECUTE_HANDLER) break; + } + + /* Bail out if this is the last handler */ + if (CurrentFrame == EstablisherFrame) + return ExceptionContinueSearch; + + /* Go to the next frame */ + CurrentFrame = CurrentFrame->Next; + } + + /* Call RtlUnwind to unwind the frames below this one */ + _SEH3$_CallRtlUnwind(EstablisherFrame); + + /* Do a local unwind up to this frame */ + TargetFrame = CurrentFrame; + } + + /* Loop frames up to the target frame */ + for (CurrentFrame = EstablisherFrame->EndOfChain; + CurrentFrame != TargetFrame; + CurrentFrame = CurrentFrame->Next) + { + /* Manually unregister the frame */ + _SEH3$_Unregister(CurrentFrame); + + /* Check if this is an unwind frame */ + if (CurrentFrame->ScopeTable->Target == NULL) + { + /* Set exception pointers for this frame */ + CurrentFrame->ExceptionPointers = &ExceptionPointers; + + /* Call the finally function */ + _SEH3$_CallFinally(CurrentFrame); + } + } + + /* Check if this was an unwind */ + if (ExceptionRecord->ExceptionFlags & EXCEPTION_UNWINDING) + { + return ExceptionContinueSearch; + } + + /* Unregister the frame. It will be unregistered again at the end of the + __except block, due to auto cleanup, but that doesn't hurt. + All we do is set either fs:[0] or EstablisherFrame->EndOfChain to + CurrentFrame->Next, which will not change it's value. */ + _SEH3$_Unregister(CurrentFrame); + + /* Jump to the __except block (does not return) */ + _SEH3$_JumpToTarget(CurrentFrame); +} + Propchange: trunk/reactos/lib/pseh/i386/pseh3.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/pseh/i386/pseh3_asmdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/pseh3_asmdef…
============================================================================== --- trunk/reactos/lib/pseh/i386/pseh3_asmdef.h (added) +++ trunk/reactos/lib/pseh/i386/pseh3_asmdef.h [iso-8859-1] Sun Sep 9 21:12:00 2012 @@ -1,0 +1,12 @@ + + +#define SEH3_REGISTRATION_FRAME_Next 0 +#define SEH3_REGISTRATION_FRAME_Handler 4 +#define SEH3_REGISTRATION_FRAME_EndOfChain 8 +#define SEH3_REGISTRATION_FRAME_ScopeTable 12 +#define SEH3_REGISTRATION_FRAME_ExceptionPointers 16 +#define SEH3_REGISTRATION_FRAME_Esp 20 +#define SEH3_REGISTRATION_FRAME_Ebp 24 + +#define SEH3_SCOPE_TABLE_Target 0 +#define SEH3_SCOPE_TABLE_Filter 4 Propchange: trunk/reactos/lib/pseh/i386/pseh3_asmdef.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/pseh/i386/pseh3_i386.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/pseh3_i386.S…
============================================================================== --- trunk/reactos/lib/pseh/i386/pseh3_i386.S (added) +++ trunk/reactos/lib/pseh/i386/pseh3_i386.S [iso-8859-1] Sun Sep 9 21:12:00 2012 @@ -1,0 +1,72 @@ +/* + * PROJECT: ReactOS system libraries + * LICENSE: GNU GPL - See COPYING in the top level directory + * PURPOSE: Support library for PSEH3 + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +#include "pseh3_asmdef.h" + +.intel_syntax noprefix + +.text + + +.extern __SEH3$_except_handler + +/* + * void + * _SEH3$_RegisterFrame( + * PSEH_REGISTRATION_FRAME RegistrationRecord<ecx>, + * PSEH_DATA_TABLE DataTable<eax>); + */ +.global __SEH3$_RegisterFrame +__SEH3$_RegisterFrame: + + /* Save the address of the static data table */ + mov [ecx + SEH3_REGISTRATION_FRAME_ScopeTable], eax + + /* Set the handler address */ + mov dword ptr [ecx + SEH3_REGISTRATION_FRAME_Handler], offset __SEH3$_except_handler + + /* Set this as the end of the internal chain */ + mov dword ptr [ecx + SEH3_REGISTRATION_FRAME_EndOfChain], ecx + + /* Register the frame in the TEB */ + mov eax, dword ptr fs:[0] + mov [ecx + SEH3_REGISTRATION_FRAME_Next], eax + mov dword ptr fs:[0], ecx + + /* Save the registers */ + mov [ecx + SEH3_REGISTRATION_FRAME_Esp], esp + mov [ecx + SEH3_REGISTRATION_FRAME_Ebp], ebp + + ret + + +.global __SEH3$_RegisterTryLevel +__SEH3$_RegisterTryLevel: + + /* Save the address of the static data table */ + mov [ecx + SEH3_REGISTRATION_FRAME_ScopeTable], eax + + /* Set the handler address to NULL as identification */ + and dword ptr [ecx + SEH3_REGISTRATION_FRAME_Handler], 0 + + /* Get the current registered frame */ + mov eax, dword ptr fs:[0] + + /* Get the current end of the chain and set this as Next */ + mov edx, [eax + SEH3_REGISTRATION_FRAME_EndOfChain] + mov [ecx + SEH3_REGISTRATION_FRAME_Next], edx + + /* Set this as the end of the internal chain */ + mov dword ptr [eax + SEH3_REGISTRATION_FRAME_EndOfChain], ecx + + /* Save the registers */ + mov [ecx + SEH3_REGISTRATION_FRAME_Esp], esp + mov [ecx + SEH3_REGISTRATION_FRAME_Ebp], ebp + + ret + + Propchange: trunk/reactos/lib/pseh/i386/pseh3_i386.S ------------------------------------------------------------------------------ svn:eol-style = native
12 years, 3 months
1
0
0
0
[akhaldi] 57258: [MSXML3_WINETEST] * Addendum to r57257.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 9 19:49:50 2012 New Revision: 57258 URL:
http://svn.reactos.org/svn/reactos?rev=57258&view=rev
Log: [MSXML3_WINETEST] * Addendum to r57257. Added: trunk/rostests/winetests/msxml3/rsrc.rc (with props) trunk/rostests/winetests/msxml3/xmlparser.c (with props) trunk/rostests/winetests/msxml3/xmlparser.idl (with props) trunk/rostests/winetests/msxml3/xmlview.c (with props) trunk/rostests/winetests/msxml3/xmlview.xml (with props) trunk/rostests/winetests/msxml3/xmlview.xsl (with props) Removed: trunk/rostests/winetests/msxml3/xmlelem.c Modified: trunk/rostests/winetests/msxml3/CMakeLists.txt trunk/rostests/winetests/msxml3/domdoc.c trunk/rostests/winetests/msxml3/saxreader.c trunk/rostests/winetests/msxml3/schema.c trunk/rostests/winetests/msxml3/testlist.c trunk/rostests/winetests/msxml3/xmldoc.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/msxml3/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/CMakeLis…
Modified: trunk/rostests/winetests/msxml3/domdoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/domdoc.c…
Added: trunk/rostests/winetests/msxml3/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/rsrc.rc?…
Modified: trunk/rostests/winetests/msxml3/saxreader.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/saxreade…
Modified: trunk/rostests/winetests/msxml3/schema.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/schema.c…
Modified: trunk/rostests/winetests/msxml3/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/testlist…
Modified: trunk/rostests/winetests/msxml3/xmldoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/xmldoc.c…
Removed: trunk/rostests/winetests/msxml3/xmlelem.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/xmlelem.…
Added: trunk/rostests/winetests/msxml3/xmlparser.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/xmlparse…
Added: trunk/rostests/winetests/msxml3/xmlparser.idl URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/xmlparse…
Added: trunk/rostests/winetests/msxml3/xmlview.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/xmlview.…
Added: trunk/rostests/winetests/msxml3/xmlview.xml URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/xmlview.…
Added: trunk/rostests/winetests/msxml3/xmlview.xsl URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/xmlview.…
12 years, 3 months
1
0
0
0
[akhaldi] 57257: * Improve the whole msxml* situation in ReactOS, which improves compatibility with many applications (MS Visual C++ 2010 Redistributable Package, I'm looking at you !) [PSDK]: Sync...
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 9 19:47:25 2012 New Revision: 57257 URL:
http://svn.reactos.org/svn/reactos?rev=57257&view=rev
Log: * Improve the whole msxml* situation in ReactOS, which improves compatibility with many applications (MS Visual C++ 2010 Redistributable Package, I'm looking at you !) [PSDK]: Sync some headers and idl files with Wine. [PSDK]: Import xmldom.h from Wine. [LIBWINE]: Sync some debugging functions with Wine. [UUID]: Add SID_SContainerDispatch. [MSXML]: Import from Wine. [MSXML2]: Import from Wine. [MSXML3]: Sync with Wine 1.5.12. [MSXML4]: Import from Wine. [MSXML6]: Import from Wine. [SYSSETUP]: Register the newly imported msxml* dlls. Added: trunk/reactos/dll/win32/msxml/ trunk/reactos/dll/win32/msxml/CMakeLists.txt (with props) trunk/reactos/dll/win32/msxml/Makefile.in (with props) trunk/reactos/dll/win32/msxml/main.c (with props) trunk/reactos/dll/win32/msxml/msxml.rgs (with props) trunk/reactos/dll/win32/msxml/msxml.spec (with props) trunk/reactos/dll/win32/msxml/msxml_tlb.idl (with props) trunk/reactos/dll/win32/msxml/msxml_tlb.rgs (with props) trunk/reactos/dll/win32/msxml/rsrc.rc (with props) trunk/reactos/dll/win32/msxml2/ trunk/reactos/dll/win32/msxml2/CMakeLists.txt (with props) trunk/reactos/dll/win32/msxml2/Makefile.in (with props) trunk/reactos/dll/win32/msxml2/main.c (with props) trunk/reactos/dll/win32/msxml2/msxml2.rc (with props) trunk/reactos/dll/win32/msxml2/msxml2.spec (with props) trunk/reactos/dll/win32/msxml2/msxml2_tlb.idl (with props) trunk/reactos/dll/win32/msxml2/msxml2_tlb.rgs (with props) trunk/reactos/dll/win32/msxml3/datatypes.xsd (with props) trunk/reactos/dll/win32/msxml3/doctype.c (with props) trunk/reactos/dll/win32/msxml3/msxml3.manifest (with props) trunk/reactos/dll/win32/msxml3/msxml3_v1.rgs (with props) trunk/reactos/dll/win32/msxml3/mxnamespace.c (with props) trunk/reactos/dll/win32/msxml3/mxwriter.c (with props) trunk/reactos/dll/win32/msxml3/schemas.rc (with props) trunk/reactos/dll/win32/msxml3/selection.c (with props) trunk/reactos/dll/win32/msxml3/stylesheet.c (with props) trunk/reactos/dll/win32/msxml3/xdr.c (with props) trunk/reactos/dll/win32/msxml3/xmlparser.c (with props) trunk/reactos/dll/win32/msxml3/xmlparser.idl (with props) trunk/reactos/dll/win32/msxml3/xmlparser.rgs (with props) trunk/reactos/dll/win32/msxml3/xmlview.c (with props) trunk/reactos/dll/win32/msxml3/xslpattern.h (with props) trunk/reactos/dll/win32/msxml3/xslpattern.l (with props) trunk/reactos/dll/win32/msxml3/xslpattern.tab.c (with props) trunk/reactos/dll/win32/msxml3/xslpattern.tab.h (with props) trunk/reactos/dll/win32/msxml3/xslpattern.y (with props) trunk/reactos/dll/win32/msxml3/xslpattern.yy.c (with props) trunk/reactos/dll/win32/msxml4/ trunk/reactos/dll/win32/msxml4/CMakeLists.txt (with props) trunk/reactos/dll/win32/msxml4/Makefile.in (with props) trunk/reactos/dll/win32/msxml4/main.c (with props) trunk/reactos/dll/win32/msxml4/msxml4.manifest (with props) trunk/reactos/dll/win32/msxml4/msxml4.spec (with props) trunk/reactos/dll/win32/msxml4/msxml4_tlb.idl (with props) trunk/reactos/dll/win32/msxml4/msxml4_tlb.rgs (with props) trunk/reactos/dll/win32/msxml4/rsrc.rc (with props) trunk/reactos/dll/win32/msxml6/ trunk/reactos/dll/win32/msxml6/CMakeLists.txt (with props) trunk/reactos/dll/win32/msxml6/Makefile.in (with props) trunk/reactos/dll/win32/msxml6/main.c (with props) trunk/reactos/dll/win32/msxml6/msxml6.manifest (with props) trunk/reactos/dll/win32/msxml6/msxml6.spec (with props) trunk/reactos/dll/win32/msxml6/msxml6_tlb.idl (with props) trunk/reactos/dll/win32/msxml6/msxml6_tlb.rgs (with props) trunk/reactos/dll/win32/msxml6/rsrc.rc (with props) trunk/reactos/include/psdk/xmldom.h (with props) Removed: trunk/reactos/dll/win32/msxml3/queryresult.c trunk/reactos/dll/win32/msxml3/regsvr.c Modified: trunk/reactos/dll/win32/CMakeLists.txt trunk/reactos/dll/win32/msxml3/CMakeLists.txt trunk/reactos/dll/win32/msxml3/attribute.c trunk/reactos/dll/win32/msxml3/bsc.c trunk/reactos/dll/win32/msxml3/cdata.c trunk/reactos/dll/win32/msxml3/comment.c trunk/reactos/dll/win32/msxml3/dispex.c trunk/reactos/dll/win32/msxml3/docfrag.c trunk/reactos/dll/win32/msxml3/domdoc.c trunk/reactos/dll/win32/msxml3/domimpl.c trunk/reactos/dll/win32/msxml3/element.c trunk/reactos/dll/win32/msxml3/entityref.c trunk/reactos/dll/win32/msxml3/factory.c trunk/reactos/dll/win32/msxml3/httprequest.c trunk/reactos/dll/win32/msxml3/main.c trunk/reactos/dll/win32/msxml3/msxml3.spec trunk/reactos/dll/win32/msxml3/msxml_private.h trunk/reactos/dll/win32/msxml3/node.c trunk/reactos/dll/win32/msxml3/nodelist.c trunk/reactos/dll/win32/msxml3/nodemap.c trunk/reactos/dll/win32/msxml3/parseerror.c trunk/reactos/dll/win32/msxml3/pi.c trunk/reactos/dll/win32/msxml3/saxreader.c trunk/reactos/dll/win32/msxml3/schema.c trunk/reactos/dll/win32/msxml3/text.c trunk/reactos/dll/win32/msxml3/uuid.c trunk/reactos/dll/win32/msxml3/version.rc trunk/reactos/dll/win32/msxml3/xmldoc.c trunk/reactos/dll/win32/msxml3/xmlelem.c trunk/reactos/include/psdk/docobj.idl trunk/reactos/include/psdk/idispids.h trunk/reactos/include/psdk/msxml.idl trunk/reactos/include/psdk/msxml2.idl trunk/reactos/include/psdk/msxml2did.h trunk/reactos/include/psdk/msxml6.idl trunk/reactos/include/psdk/xmldom.idl trunk/reactos/include/psdk/xmldso.idl trunk/reactos/include/reactos/wine/debug.h trunk/reactos/lib/3rdparty/libwine/debug.c trunk/reactos/lib/sdk/uuid/ieguids.c trunk/reactos/media/doc/README.WINE trunk/reactos/media/inf/syssetup.inf [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/CMakeLists.txt?r…
Added: trunk/reactos/dll/win32/msxml/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml/CMakeLists…
Added: trunk/reactos/dll/win32/msxml/Makefile.in URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml/Makefile.i…
Added: trunk/reactos/dll/win32/msxml/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml/main.c?rev…
Added: trunk/reactos/dll/win32/msxml/msxml.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml/msxml.rgs?…
Added: trunk/reactos/dll/win32/msxml/msxml.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml/msxml.spec…
Added: trunk/reactos/dll/win32/msxml/msxml_tlb.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml/msxml_tlb.…
Added: trunk/reactos/dll/win32/msxml/msxml_tlb.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml/msxml_tlb.…
Added: trunk/reactos/dll/win32/msxml/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml/rsrc.rc?re…
Added: trunk/reactos/dll/win32/msxml2/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml2/CMakeList…
Added: trunk/reactos/dll/win32/msxml2/Makefile.in URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml2/Makefile.…
Added: trunk/reactos/dll/win32/msxml2/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml2/main.c?re…
Added: trunk/reactos/dll/win32/msxml2/msxml2.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml2/msxml2.rc…
Added: trunk/reactos/dll/win32/msxml2/msxml2.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml2/msxml2.sp…
Added: trunk/reactos/dll/win32/msxml2/msxml2_tlb.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml2/msxml2_tl…
Added: trunk/reactos/dll/win32/msxml2/msxml2_tlb.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml2/msxml2_tl…
Modified: trunk/reactos/dll/win32/msxml3/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/CMakeList…
Modified: trunk/reactos/dll/win32/msxml3/attribute.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/attribute…
Modified: trunk/reactos/dll/win32/msxml3/bsc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/bsc.c?rev…
Modified: trunk/reactos/dll/win32/msxml3/cdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/cdata.c?r…
Modified: trunk/reactos/dll/win32/msxml3/comment.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/comment.c…
Added: trunk/reactos/dll/win32/msxml3/datatypes.xsd URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/datatypes…
Modified: trunk/reactos/dll/win32/msxml3/dispex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/dispex.c?…
Modified: trunk/reactos/dll/win32/msxml3/docfrag.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/docfrag.c…
Added: trunk/reactos/dll/win32/msxml3/doctype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/doctype.c…
Modified: trunk/reactos/dll/win32/msxml3/domdoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/domdoc.c?…
Modified: trunk/reactos/dll/win32/msxml3/domimpl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/domimpl.c…
Modified: trunk/reactos/dll/win32/msxml3/element.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/element.c…
Modified: trunk/reactos/dll/win32/msxml3/entityref.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/entityref…
Modified: trunk/reactos/dll/win32/msxml3/factory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/factory.c…
Modified: trunk/reactos/dll/win32/msxml3/httprequest.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/httpreque…
Modified: trunk/reactos/dll/win32/msxml3/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/main.c?re…
Added: trunk/reactos/dll/win32/msxml3/msxml3.manifest URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msxml3.ma…
Modified: trunk/reactos/dll/win32/msxml3/msxml3.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msxml3.sp…
Added: trunk/reactos/dll/win32/msxml3/msxml3_v1.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msxml3_v1…
Modified: trunk/reactos/dll/win32/msxml3/msxml_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msxml_pri…
Added: trunk/reactos/dll/win32/msxml3/mxnamespace.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/mxnamespa…
Added: trunk/reactos/dll/win32/msxml3/mxwriter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/mxwriter.…
Modified: trunk/reactos/dll/win32/msxml3/node.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/node.c?re…
Modified: trunk/reactos/dll/win32/msxml3/nodelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/nodelist.…
Modified: trunk/reactos/dll/win32/msxml3/nodemap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/nodemap.c…
Modified: trunk/reactos/dll/win32/msxml3/parseerror.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/parseerro…
Modified: trunk/reactos/dll/win32/msxml3/pi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/pi.c?rev=…
Removed: trunk/reactos/dll/win32/msxml3/queryresult.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/queryresu…
Removed: trunk/reactos/dll/win32/msxml3/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/regsvr.c?…
Modified: trunk/reactos/dll/win32/msxml3/saxreader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/saxreader…
Modified: trunk/reactos/dll/win32/msxml3/schema.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/schema.c?…
Added: trunk/reactos/dll/win32/msxml3/schemas.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/schemas.r…
Added: trunk/reactos/dll/win32/msxml3/selection.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/selection…
Added: trunk/reactos/dll/win32/msxml3/stylesheet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/styleshee…
Modified: trunk/reactos/dll/win32/msxml3/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/text.c?re…
Modified: trunk/reactos/dll/win32/msxml3/uuid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/uuid.c?re…
Modified: trunk/reactos/dll/win32/msxml3/version.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/version.r…
Added: trunk/reactos/dll/win32/msxml3/xdr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xdr.c?rev…
Modified: trunk/reactos/dll/win32/msxml3/xmldoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmldoc.c?…
Modified: trunk/reactos/dll/win32/msxml3/xmlelem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmlelem.c…
Added: trunk/reactos/dll/win32/msxml3/xmlparser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmlparser…
Added: trunk/reactos/dll/win32/msxml3/xmlparser.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmlparser…
Added: trunk/reactos/dll/win32/msxml3/xmlparser.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmlparser…
Added: trunk/reactos/dll/win32/msxml3/xmlview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmlview.c…
Added: trunk/reactos/dll/win32/msxml3/xslpattern.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xslpatter…
Added: trunk/reactos/dll/win32/msxml3/xslpattern.l URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xslpatter…
Added: trunk/reactos/dll/win32/msxml3/xslpattern.tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xslpatter…
Added: trunk/reactos/dll/win32/msxml3/xslpattern.tab.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xslpatter…
Added: trunk/reactos/dll/win32/msxml3/xslpattern.y URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xslpatter…
Added: trunk/reactos/dll/win32/msxml3/xslpattern.yy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xslpatter…
Added: trunk/reactos/dll/win32/msxml4/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml4/CMakeList…
Added: trunk/reactos/dll/win32/msxml4/Makefile.in URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml4/Makefile.…
Added: trunk/reactos/dll/win32/msxml4/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml4/main.c?re…
Added: trunk/reactos/dll/win32/msxml4/msxml4.manifest URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml4/msxml4.ma…
Added: trunk/reactos/dll/win32/msxml4/msxml4.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml4/msxml4.sp…
Added: trunk/reactos/dll/win32/msxml4/msxml4_tlb.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml4/msxml4_tl…
Added: trunk/reactos/dll/win32/msxml4/msxml4_tlb.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml4/msxml4_tl…
Added: trunk/reactos/dll/win32/msxml4/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml4/rsrc.rc?r…
Added: trunk/reactos/dll/win32/msxml6/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml6/CMakeList…
Added: trunk/reactos/dll/win32/msxml6/Makefile.in URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml6/Makefile.…
Added: trunk/reactos/dll/win32/msxml6/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml6/main.c?re…
Added: trunk/reactos/dll/win32/msxml6/msxml6.manifest URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml6/msxml6.ma…
Added: trunk/reactos/dll/win32/msxml6/msxml6.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml6/msxml6.sp…
Added: trunk/reactos/dll/win32/msxml6/msxml6_tlb.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml6/msxml6_tl…
Added: trunk/reactos/dll/win32/msxml6/msxml6_tlb.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml6/msxml6_tl…
Added: trunk/reactos/dll/win32/msxml6/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml6/rsrc.rc?r…
Modified: trunk/reactos/include/psdk/docobj.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/docobj.idl?re…
Modified: trunk/reactos/include/psdk/idispids.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/idispids.h?re…
Modified: trunk/reactos/include/psdk/msxml.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/msxml.idl?rev…
Modified: trunk/reactos/include/psdk/msxml2.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/msxml2.idl?re…
Modified: trunk/reactos/include/psdk/msxml2did.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/msxml2did.h?r…
Modified: trunk/reactos/include/psdk/msxml6.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/msxml6.idl?re…
Added: trunk/reactos/include/psdk/xmldom.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/xmldom.h?rev=…
Modified: trunk/reactos/include/psdk/xmldom.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/xmldom.idl?re…
Modified: trunk/reactos/include/psdk/xmldso.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/xmldso.idl?re…
Modified: trunk/reactos/include/reactos/wine/debug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/debug…
Modified: trunk/reactos/lib/3rdparty/libwine/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/debug…
Modified: trunk/reactos/lib/sdk/uuid/ieguids.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/uuid/ieguids.c?rev…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
Modified: trunk/reactos/media/inf/syssetup.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/inf/syssetup.inf?rev…
12 years, 3 months
1
0
0
0
[ion] 57256: [NTOSKRNL]: Fix two NtAccess function prototypes (NO-OP, not implemented/used) [NTOSKRNL]: Add missing call to ObValidateAccessMask (NO-OP, always returns TRUE).
by ion@svn.reactos.org
Author: ion Date: Sun Sep 9 16:59:23 2012 New Revision: 57256 URL:
http://svn.reactos.org/svn/reactos?rev=57256&view=rev
Log: [NTOSKRNL]: Fix two NtAccess function prototypes (NO-OP, not implemented/used) [NTOSKRNL]: Add missing call to ObValidateAccessMask (NO-OP, always returns TRUE). Modified: trunk/reactos/include/ndk/sefuncs.h trunk/reactos/ntoskrnl/ex/event.c trunk/reactos/ntoskrnl/ob/obhandle.c trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/include/ndk/sefuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/sefuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/sefuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/sefuncs.h [iso-8859-1] Sun Sep 9 16:59:23 2012 @@ -109,7 +109,7 @@ IN ULONG ObjectTypeLength, IN PGENERIC_MAPPING GenericMapping, IN PPRIVILEGE_SET PrivilegeSet, - IN ULONG PrivilegeSetLength, + IN OUT PULONG PrivilegeSetLength, OUT PACCESS_MASK GrantedAccess, OUT PNTSTATUS AccessStatus ); @@ -125,7 +125,7 @@ IN ULONG ObjectTypeLength, IN PGENERIC_MAPPING GenericMapping, IN PPRIVILEGE_SET PrivilegeSet, - IN ULONG PrivilegeSetLength, + IN OUT PULONG PrivilegeSetLength, OUT PACCESS_MASK GrantedAccess, OUT PNTSTATUS AccessStatus ); Modified: trunk/reactos/ntoskrnl/ex/event.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/event.c?rev=57…
============================================================================== --- trunk/reactos/ntoskrnl/ex/event.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/event.c [iso-8859-1] Sun Sep 9 16:59:23 2012 @@ -140,7 +140,7 @@ (PVOID*)&Event); /* Check for Success */ - if(NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { /* Initalize the Event */ KeInitializeEvent(Event, @@ -156,7 +156,7 @@ &hEvent); /* Check for success */ - if(NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { /* Enter SEH for return */ _SEH2_TRY Modified: trunk/reactos/ntoskrnl/ob/obhandle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] Sun Sep 9 16:59:23 2012 @@ -2490,6 +2490,15 @@ PassedAccessState->SecurityDescriptor = TempBuffer->ObjectCreateInfo.SecurityDescriptor; } + + /* Validate the access mask */ + Status = ObpValidateAccessMask(PassedAccessState); + if (!NT_SUCCESS(Status)) + { + /* Cleanup after lookup */ + ObpReleaseLookupContext(&TempBuffer->LookupContext); + goto Cleanup; + } /* Now do the lookup */ Status = ObpLookupObjectName(TempBuffer->ObjectCreateInfo.RootDirectory, Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=57…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] Sun Sep 9 16:59:23 2012 @@ -1072,7 +1072,7 @@ IN ULONG ObjectTypeLength, IN PGENERIC_MAPPING GenericMapping, IN PPRIVILEGE_SET PrivilegeSet, - IN ULONG PrivilegeSetLength, + IN OUT PULONG PrivilegeSetLength, OUT PACCESS_MASK GrantedAccess, OUT PNTSTATUS AccessStatus) { @@ -1113,7 +1113,7 @@ IN ULONG ObjectTypeLength, IN PGENERIC_MAPPING GenericMapping, IN PPRIVILEGE_SET PrivilegeSet, - IN ULONG PrivilegeSetLength, + IN OUT PULONG PrivilegeSetLength, OUT PACCESS_MASK GrantedAccess, OUT PNTSTATUS AccessStatus) {
12 years, 3 months
1
0
0
0
[tkreuzer] 57255: [XDK] - Move exception stuff to rtltypes.h - Add missing exception flags - Add _DISK_GEOMETRY_EX forward declaration [PSDK] - Add missing exception flags to winnt.h [NDK] - Remove...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Sep 9 10:42:32 2012 New Revision: 57255 URL:
http://svn.reactos.org/svn/reactos?rev=57255&view=rev
Log: [XDK] - Move exception stuff to rtltypes.h - Add missing exception flags - Add _DISK_GEOMETRY_EX forward declaration [PSDK] - Add missing exception flags to winnt.h [NDK] - Remove exception flags, they are defined in both winnt.h and wdm.h Modified: trunk/reactos/include/ddk/ntddk.h trunk/reactos/include/ddk/wdm.h trunk/reactos/include/ndk/rtltypes.h trunk/reactos/include/psdk/winnt.h trunk/reactos/include/xdk/ketypes.h trunk/reactos/include/xdk/ntddk.template.h trunk/reactos/include/xdk/rtltypes.h Modified: trunk/reactos/include/ddk/ntddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddk.h?rev=57…
============================================================================== --- trunk/reactos/include/ddk/ntddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntddk.h [iso-8859-1] Sun Sep 9 10:42:32 2012 @@ -69,6 +69,7 @@ struct _CREATE_DISK; struct _DRIVE_LAYOUT_INFORMATION_EX; struct _SET_PARTITION_INFORMATION_EX; +struct _DISK_GEOMETRY_EX; typedef struct _BUS_HANDLER *PBUS_HANDLER; typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT; @@ -4211,9 +4212,6 @@ #endif /* (NTDDI_VERSION >= NTDDI_WS03SP1) */ #if (NTDDI_VERSION >= NTDDI_VISTA) - -struct _DISK_GEOMETRY_EX; - NTKERNELAPI NTSTATUS NTAPI Modified: trunk/reactos/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=5725…
============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sun Sep 9 10:42:32 2012 @@ -547,6 +547,57 @@ #endif /* _SLIST_HEADER_ */ +/* Exception record flags */ +#define EXCEPTION_NONCONTINUABLE 0x01 +#define EXCEPTION_UNWINDING 0x02 +#define EXCEPTION_EXIT_UNWIND 0x04 +#define EXCEPTION_STACK_INVALID 0x08 +#define EXCEPTION_NESTED_CALL 0x10 +#define EXCEPTION_TARGET_UNWIND 0x20 +#define EXCEPTION_COLLIDED_UNWIND 0x40 +#define EXCEPTION_UNWIND (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND | \ + EXCEPTION_TARGET_UNWIND | EXCEPTION_COLLIDED_UNWIND) + +#define IS_UNWINDING(Flag) ((Flag & EXCEPTION_UNWIND) != 0) +#define IS_DISPATCHING(Flag) ((Flag & EXCEPTION_UNWIND) == 0) +#define IS_TARGET_UNWIND(Flag) (Flag & EXCEPTION_TARGET_UNWIND) + +#define EXCEPTION_MAXIMUM_PARAMETERS 15 + +/* Exception records */ +typedef struct _EXCEPTION_RECORD { + NTSTATUS ExceptionCode; + ULONG ExceptionFlags; + struct _EXCEPTION_RECORD *ExceptionRecord; + PVOID ExceptionAddress; + ULONG NumberParameters; + ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD, *PEXCEPTION_RECORD; + +typedef struct _EXCEPTION_RECORD32 { + NTSTATUS ExceptionCode; + ULONG ExceptionFlags; + ULONG ExceptionRecord; + ULONG ExceptionAddress; + ULONG NumberParameters; + ULONG ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD32, *PEXCEPTION_RECORD32; + +typedef struct _EXCEPTION_RECORD64 { + NTSTATUS ExceptionCode; + ULONG ExceptionFlags; + ULONG64 ExceptionRecord; + ULONG64 ExceptionAddress; + ULONG NumberParameters; + ULONG __unusedAlignment; + ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64; + +typedef struct _EXCEPTION_POINTERS { + PEXCEPTION_RECORD ExceptionRecord; + PCONTEXT ContextRecord; +} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS; + /* MS definition is broken! */ extern BOOLEAN NTSYSAPI NlsMbCodePageTag; extern BOOLEAN NTSYSAPI NlsMbOemCodePageTag; @@ -772,10 +823,6 @@ #endif #define MAXIMUM_PROCESSORS MAXIMUM_PROC_PER_GROUP -/* Exception Records */ -#define EXCEPTION_NONCONTINUABLE 1 -#define EXCEPTION_MAXIMUM_PARAMETERS 15 - #define EXCEPTION_DIVIDED_BY_ZERO 0 #define EXCEPTION_DEBUG 1 #define EXCEPTION_NMI 2 @@ -792,39 +839,6 @@ #define EXCEPTION_RESERVED_TRAP 0x0F #define EXCEPTION_NPX_ERROR 0x010 #define EXCEPTION_ALIGNMENT_CHECK 0x011 - -typedef struct _EXCEPTION_RECORD { - NTSTATUS ExceptionCode; - ULONG ExceptionFlags; - struct _EXCEPTION_RECORD *ExceptionRecord; - PVOID ExceptionAddress; - ULONG NumberParameters; - ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; -} EXCEPTION_RECORD, *PEXCEPTION_RECORD; - -typedef struct _EXCEPTION_RECORD32 { - NTSTATUS ExceptionCode; - ULONG ExceptionFlags; - ULONG ExceptionRecord; - ULONG ExceptionAddress; - ULONG NumberParameters; - ULONG ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; -} EXCEPTION_RECORD32, *PEXCEPTION_RECORD32; - -typedef struct _EXCEPTION_RECORD64 { - NTSTATUS ExceptionCode; - ULONG ExceptionFlags; - ULONG64 ExceptionRecord; - ULONG64 ExceptionAddress; - ULONG NumberParameters; - ULONG __unusedAlignment; - ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; -} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64; - -typedef struct _EXCEPTION_POINTERS { - PEXCEPTION_RECORD ExceptionRecord; - PCONTEXT ContextRecord; -} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS; typedef enum _KBUGCHECK_CALLBACK_REASON { KbCallbackInvalid, Modified: trunk/reactos/include/ndk/rtltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtltypes.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] Sun Sep 9 10:42:32 2012 @@ -54,16 +54,9 @@ #define RTL_DRIVE_LETTER_VALID (USHORT)0x0001 // -// Exception Flags +// End of Exception List // #define EXCEPTION_CHAIN_END ((PEXCEPTION_REGISTRATION_RECORD)-1) -#define EXCEPTION_UNWINDING 0x02 -#define EXCEPTION_EXIT_UNWIND 0x04 -#define EXCEPTION_STACK_INVALID 0x08 -#define EXCEPTION_UNWIND (EXCEPTION_UNWINDING + EXCEPTION_EXIT_UNWIND) -#define EXCEPTION_NESTED_CALL 0x10 -#define EXCEPTION_TARGET_UNWIND 0x20 -#define EXCEPTION_COLLIDED_UNWIND 0x20 // // Range and Range List Flags Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=5…
============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sun Sep 9 10:42:32 2012 @@ -3174,8 +3174,20 @@ #endif typedef CONTEXT *PCONTEXT,*LPCONTEXT; -#define EXCEPTION_NONCONTINUABLE 1 #define EXCEPTION_MAXIMUM_PARAMETERS 15 +#define EXCEPTION_NONCONTINUABLE 0x01 +#define EXCEPTION_UNWINDING 0x02 +#define EXCEPTION_EXIT_UNWIND 0x04 +#define EXCEPTION_STACK_INVALID 0x08 +#define EXCEPTION_NESTED_CALL 0x10 +#define EXCEPTION_TARGET_UNWIND 0x20 +#define EXCEPTION_COLLIDED_UNWIND 0x40 +#define EXCEPTION_UNWIND (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND | \ + EXCEPTION_TARGET_UNWIND | EXCEPTION_COLLIDED_UNWIND) + +#define IS_UNWINDING(Flag) ((Flag & EXCEPTION_UNWIND) != 0) +#define IS_DISPATCHING(Flag) ((Flag & EXCEPTION_UNWIND) == 0) +#define IS_TARGET_UNWIND(Flag) (Flag & EXCEPTION_TARGET_UNWIND) typedef struct _EXCEPTION_RECORD { DWORD ExceptionCode; Modified: trunk/reactos/include/xdk/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ketypes.h?rev=…
============================================================================== --- trunk/reactos/include/xdk/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/ketypes.h [iso-8859-1] Sun Sep 9 10:42:32 2012 @@ -200,10 +200,6 @@ #endif #define MAXIMUM_PROCESSORS MAXIMUM_PROC_PER_GROUP -/* Exception Records */ -#define EXCEPTION_NONCONTINUABLE 1 -#define EXCEPTION_MAXIMUM_PARAMETERS 15 - #define EXCEPTION_DIVIDED_BY_ZERO 0 #define EXCEPTION_DEBUG 1 #define EXCEPTION_NMI 2 @@ -220,39 +216,6 @@ #define EXCEPTION_RESERVED_TRAP 0x0F #define EXCEPTION_NPX_ERROR 0x010 #define EXCEPTION_ALIGNMENT_CHECK 0x011 - -typedef struct _EXCEPTION_RECORD { - NTSTATUS ExceptionCode; - ULONG ExceptionFlags; - struct _EXCEPTION_RECORD *ExceptionRecord; - PVOID ExceptionAddress; - ULONG NumberParameters; - ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; -} EXCEPTION_RECORD, *PEXCEPTION_RECORD; - -typedef struct _EXCEPTION_RECORD32 { - NTSTATUS ExceptionCode; - ULONG ExceptionFlags; - ULONG ExceptionRecord; - ULONG ExceptionAddress; - ULONG NumberParameters; - ULONG ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; -} EXCEPTION_RECORD32, *PEXCEPTION_RECORD32; - -typedef struct _EXCEPTION_RECORD64 { - NTSTATUS ExceptionCode; - ULONG ExceptionFlags; - ULONG64 ExceptionRecord; - ULONG64 ExceptionAddress; - ULONG NumberParameters; - ULONG __unusedAlignment; - ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; -} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64; - -typedef struct _EXCEPTION_POINTERS { - PEXCEPTION_RECORD ExceptionRecord; - PCONTEXT ContextRecord; -} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS; typedef enum _KBUGCHECK_CALLBACK_REASON { KbCallbackInvalid, Modified: trunk/reactos/include/xdk/ntddk.template.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ntddk.template…
============================================================================== --- trunk/reactos/include/xdk/ntddk.template.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/ntddk.template.h [iso-8859-1] Sun Sep 9 10:42:32 2012 @@ -69,6 +69,7 @@ struct _CREATE_DISK; struct _DRIVE_LAYOUT_INFORMATION_EX; struct _SET_PARTITION_INFORMATION_EX; +struct _DISK_GEOMETRY_EX; typedef struct _BUS_HANDLER *PBUS_HANDLER; typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT; Modified: trunk/reactos/include/xdk/rtltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/rtltypes.h?rev…
============================================================================== --- trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] Sun Sep 9 10:42:32 2012 @@ -146,6 +146,57 @@ #endif /* _SLIST_HEADER_ */ +/* Exception record flags */ +#define EXCEPTION_NONCONTINUABLE 0x01 +#define EXCEPTION_UNWINDING 0x02 +#define EXCEPTION_EXIT_UNWIND 0x04 +#define EXCEPTION_STACK_INVALID 0x08 +#define EXCEPTION_NESTED_CALL 0x10 +#define EXCEPTION_TARGET_UNWIND 0x20 +#define EXCEPTION_COLLIDED_UNWIND 0x40 +#define EXCEPTION_UNWIND (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND | \ + EXCEPTION_TARGET_UNWIND | EXCEPTION_COLLIDED_UNWIND) + +#define IS_UNWINDING(Flag) ((Flag & EXCEPTION_UNWIND) != 0) +#define IS_DISPATCHING(Flag) ((Flag & EXCEPTION_UNWIND) == 0) +#define IS_TARGET_UNWIND(Flag) (Flag & EXCEPTION_TARGET_UNWIND) + +#define EXCEPTION_MAXIMUM_PARAMETERS 15 + +/* Exception records */ +typedef struct _EXCEPTION_RECORD { + NTSTATUS ExceptionCode; + ULONG ExceptionFlags; + struct _EXCEPTION_RECORD *ExceptionRecord; + PVOID ExceptionAddress; + ULONG NumberParameters; + ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD, *PEXCEPTION_RECORD; + +typedef struct _EXCEPTION_RECORD32 { + NTSTATUS ExceptionCode; + ULONG ExceptionFlags; + ULONG ExceptionRecord; + ULONG ExceptionAddress; + ULONG NumberParameters; + ULONG ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD32, *PEXCEPTION_RECORD32; + +typedef struct _EXCEPTION_RECORD64 { + NTSTATUS ExceptionCode; + ULONG ExceptionFlags; + ULONG64 ExceptionRecord; + ULONG64 ExceptionAddress; + ULONG NumberParameters; + ULONG __unusedAlignment; + ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64; + +typedef struct _EXCEPTION_POINTERS { + PEXCEPTION_RECORD ExceptionRecord; + PCONTEXT ContextRecord; +} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS; + /* MS definition is broken! */ extern BOOLEAN NTSYSAPI NlsMbCodePageTag; extern BOOLEAN NTSYSAPI NlsMbOemCodePageTag;
12 years, 3 months
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
23
24
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
Results per page:
10
25
50
100
200