From 64ebe91f788b8c0fb5984fb6f01b4441eefe08ed Mon Sep 17 00:00:00 2001 From: David Welch Date: Wed, 5 Dec 2001 01:40:25 +0000 Subject: [PATCH] Fixed security define spelling Added duplication notification svn path=/trunk/; revision=2416 --- reactos/include/ddk/obtypes.h | 6 +++++- reactos/include/ntos/security.h | 13 +++++++++++++ reactos/ntoskrnl/cm/registry.c | 3 ++- reactos/ntoskrnl/ex/win32k.c | 2 ++ reactos/ntoskrnl/include/internal/port.h | 11 +++++++++++ reactos/ntoskrnl/io/iomgr.c | 4 +++- reactos/ntoskrnl/io/symlink.c | 3 ++- reactos/ntoskrnl/ldr/loader.c | 3 ++- reactos/ntoskrnl/lpc/port.c | 3 ++- reactos/ntoskrnl/mm/section.c | 3 ++- reactos/ntoskrnl/nt/evtpair.c | 3 ++- reactos/ntoskrnl/nt/mutant.c | 1 + reactos/ntoskrnl/nt/ntevent.c | 1 + reactos/ntoskrnl/nt/ntsem.c | 3 ++- reactos/ntoskrnl/nt/nttimer.c | 3 ++- reactos/ntoskrnl/ob/namespc.c | 3 ++- reactos/ntoskrnl/ps/process.c | 3 ++- reactos/ntoskrnl/ps/thread.c | 3 ++- reactos/ntoskrnl/se/sd.c | 6 +++--- reactos/ntoskrnl/se/token.c | 4 ++-- 20 files changed, 63 insertions(+), 18 deletions(-) diff --git a/reactos/include/ddk/obtypes.h b/reactos/include/ddk/obtypes.h index 42a43eb270f..39e2d0dee8d 100644 --- a/reactos/include/ddk/obtypes.h +++ b/reactos/include/ddk/obtypes.h @@ -1,6 +1,6 @@ #ifndef _INCLUDE_DDK_OBTYPES_H #define _INCLUDE_DDK_OBTYPES_H -/* $Id: obtypes.h,v 1.13 2001/08/26 17:23:39 ekohl Exp $ */ +/* $Id: obtypes.h,v 1.14 2001/12/05 01:40:23 dwelch Exp $ */ struct _DIRECTORY_OBJECT; struct _OBJECT_ATTRIBUTES; @@ -116,6 +116,10 @@ typedef struct _OBJECT_TYPE PVOID Parent, PWSTR RemainingPath, struct _OBJECT_ATTRIBUTES* ObjectAttributes); + + VOID STDCALL (*DuplicationNotify)(PEPROCESS DuplicateTo, + PEPROCESS DuplicateFrom, + PVOID Object); } OBJECT_TYPE, *POBJECT_TYPE; diff --git a/reactos/include/ntos/security.h b/reactos/include/ntos/security.h index 7b6ec10e887..4581e673ea7 100644 --- a/reactos/include/ntos/security.h +++ b/reactos/include/ntos/security.h @@ -4,6 +4,19 @@ #include #include +#if 0 +/* Security descriptor control. */ +#define SECURITY_DESCRIPTOR_REVISION (1) +#define SECURITY_DESCRIPTOR_MIN_LENGTH (20) +#define SE_OWNER_DEFAULTED (1) +#define SE_GROUP_DEFAULTED (2) +#define SE_DACL_PRESENT (4) +#define SE_DACL_DEFAULTED (8) +#define SE_SACL_PRESENT (16) +#define SE_SACL_DEFAULTED (32) +#define SE_SELF_RELATIVE (32768) +#endif + /* ACCESS_MASK */ #define MAXIMUM_ALLOWED (0x2000000L) #define GENERIC_ALL (0x10000000L) diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index 5008cc05ca0..21498924b54 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.65 2001/09/08 09:02:08 ekohl Exp $ +/* $Id: registry.c,v 1.66 2001/12/05 01:40:23 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -67,6 +67,7 @@ CmInitializeRegistry(VOID) CmiKeyType->QueryName = NULL; CmiKeyType->OkayToClose = NULL; CmiKeyType->Create = CmiObjectCreate; + CmiKeyType->DuplicationNotify = NULL; RtlInitUnicodeString(&CmiKeyType->TypeName, L"Key"); /* Build volitile registry store */ diff --git a/reactos/ntoskrnl/ex/win32k.c b/reactos/ntoskrnl/ex/win32k.c index 098e771f078..78425b9a7cd 100644 --- a/reactos/ntoskrnl/ex/win32k.c +++ b/reactos/ntoskrnl/ex/win32k.c @@ -303,6 +303,7 @@ ExpWin32kInit(VOID) ExWindowStationObjectType->QueryName = NULL; ExWindowStationObjectType->OkayToClose = NULL; ExWindowStationObjectType->Create = ExpWinStaObjectCreate; + ExWindowStationObjectType->DuplicationNotify = NULL; RtlInitUnicodeString(&ExWindowStationObjectType->TypeName, L"WindowStation"); /* Create desktop object type */ @@ -330,6 +331,7 @@ ExpWin32kInit(VOID) ExDesktopObjectType->QueryName = NULL; ExDesktopObjectType->OkayToClose = NULL; ExDesktopObjectType->Create = ExpDesktopObjectCreate; + ExDesktopObjectType->DuplicationNotify = NULL; RtlInitUnicodeString(&ExDesktopObjectType->TypeName, L"Desktop"); } diff --git a/reactos/ntoskrnl/include/internal/port.h b/reactos/ntoskrnl/include/internal/port.h index 0b811d1e5fb..b987c3bd04b 100644 --- a/reactos/ntoskrnl/include/internal/port.h +++ b/reactos/ntoskrnl/include/internal/port.h @@ -3,6 +3,12 @@ #include +typedef struct _EPORT_LISTENER +{ + HANDLE ListenerPid; + LIST_ENTRY ListenerListEntry; +} EPORT_LISTENER, *PEPORT_LISTENER; + typedef struct _EPORT { KSPIN_LOCK Lock; @@ -20,6 +26,11 @@ typedef struct _EPORT ULONG MaxDataLength; ULONG MaxConnectInfoLength; + + /* + * List of processes that can receive connection requests on this port. + */ + LIST_ENTRY ListenerListHead; } EPORT, * PEPORT; diff --git a/reactos/ntoskrnl/io/iomgr.c b/reactos/ntoskrnl/io/iomgr.c index 32a618cc00e..dd6a687a5fe 100644 --- a/reactos/ntoskrnl/io/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr.c @@ -1,4 +1,4 @@ -/* $Id: iomgr.c,v 1.20 2001/08/26 17:27:00 ekohl Exp $ +/* $Id: iomgr.c,v 1.21 2001/12/05 01:40:24 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -142,6 +142,7 @@ VOID IoInit (VOID) IoDeviceObjectType->QueryName = NULL; IoDeviceObjectType->OkayToClose = NULL; IoDeviceObjectType->Create = IopCreateDevice; + IoDeviceObjectType->DuplicationNotify = NULL; RtlInitUnicodeString ( & IoDeviceObjectType->TypeName, @@ -174,6 +175,7 @@ VOID IoInit (VOID) IoFileObjectType->QueryName = NULL; IoFileObjectType->OkayToClose = NULL; IoFileObjectType->Create = IopCreateFile; + IoFileObjectType->DuplicationNotify = NULL; RtlInitUnicodeString ( & IoFileObjectType->TypeName, diff --git a/reactos/ntoskrnl/io/symlink.c b/reactos/ntoskrnl/io/symlink.c index ec6b37c213c..705d8296e09 100644 --- a/reactos/ntoskrnl/io/symlink.c +++ b/reactos/ntoskrnl/io/symlink.c @@ -1,4 +1,4 @@ -/* $Id: symlink.c,v 1.22 2001/08/26 17:27:00 ekohl Exp $ +/* $Id: symlink.c,v 1.23 2001/12/05 01:40:24 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -189,6 +189,7 @@ VOID IoInitSymbolicLinkImplementation (VOID) IoSymbolicLinkType->QueryName = NULL; IoSymbolicLinkType->OkayToClose = NULL; IoSymbolicLinkType->Create = IopCreateSymbolicLink; + IoSymbolicLinkType->DuplicationNotify = NULL; RtlInitUnicodeString(&IoSymbolicLinkType->TypeName, L"SymbolicLink"); diff --git a/reactos/ntoskrnl/ldr/loader.c b/reactos/ntoskrnl/ldr/loader.c index 5e7d1d08c7f..59298c607b8 100644 --- a/reactos/ntoskrnl/ldr/loader.c +++ b/reactos/ntoskrnl/ldr/loader.c @@ -1,4 +1,4 @@ -/* $Id: loader.c,v 1.92 2001/12/02 23:37:25 dwelch Exp $ +/* $Id: loader.c,v 1.93 2001/12/05 01:40:24 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -198,6 +198,7 @@ VOID LdrInitModuleManagement(VOID) IoDriverObjectType->QueryName = NULL; IoDriverObjectType->OkayToClose = NULL; IoDriverObjectType->Create = LdrCreateModule; + IoDriverObjectType->DuplicationNotify = NULL; RtlInitUnicodeString(&IoDriverObjectType->TypeName, L"Driver"); /* Create Modules object directory */ diff --git a/reactos/ntoskrnl/lpc/port.c b/reactos/ntoskrnl/lpc/port.c index c56824b3f4c..45b299343ba 100644 --- a/reactos/ntoskrnl/lpc/port.c +++ b/reactos/ntoskrnl/lpc/port.c @@ -1,4 +1,4 @@ -/* $Id: port.c,v 1.7 2001/12/02 23:34:42 dwelch Exp $ +/* $Id: port.c,v 1.8 2001/12/05 01:40:24 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -63,6 +63,7 @@ NTSTATUS NiInitPort (VOID) ExPortType->QueryName = NULL; ExPortType->OkayToClose = NULL; ExPortType->Create = NiCreatePort; + ExPortType->DuplicationNotify = NULL; EiNextLpcMessageId = 0; diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 9dc6cccaab4..92a2fff8161 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: section.c,v 1.67 2001/12/02 23:34:42 dwelch Exp $ +/* $Id: section.c,v 1.68 2001/12/05 01:40:25 dwelch Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/section.c @@ -987,6 +987,7 @@ MmInitSectionImplementation(VOID) MmSectionObjectType->QueryName = NULL; MmSectionObjectType->OkayToClose = NULL; MmSectionObjectType->Create = MmpCreateSection; + MmSectionObjectType->DuplicationNotify = NULL; return(STATUS_SUCCESS); } diff --git a/reactos/ntoskrnl/nt/evtpair.c b/reactos/ntoskrnl/nt/evtpair.c index 775839de431..bbf556a3262 100644 --- a/reactos/ntoskrnl/nt/evtpair.c +++ b/reactos/ntoskrnl/nt/evtpair.c @@ -1,4 +1,4 @@ -/* $Id: evtpair.c,v 1.9 2001/08/26 17:29:36 ekohl Exp $ +/* $Id: evtpair.c,v 1.10 2001/12/05 01:40:25 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -75,6 +75,7 @@ VOID NtInitializeEventPairImplementation(VOID) ExEventPairObjectType->QueryName = NULL; ExEventPairObjectType->OkayToClose = NULL; ExEventPairObjectType->Create = NtpCreateEventPair; + ExEventPairObjectType->DuplicationNotify = NULL; } diff --git a/reactos/ntoskrnl/nt/mutant.c b/reactos/ntoskrnl/nt/mutant.c index 8661483fb12..43e367ae796 100644 --- a/reactos/ntoskrnl/nt/mutant.c +++ b/reactos/ntoskrnl/nt/mutant.c @@ -105,6 +105,7 @@ NtInitializeMutantImplementation(VOID) ExMutantObjectType->QueryName = NULL; ExMutantObjectType->OkayToClose = NULL; ExMutantObjectType->Create = NtpCreateMutant; + ExMutantObjectType->DuplicationNotify = NULL; } diff --git a/reactos/ntoskrnl/nt/ntevent.c b/reactos/ntoskrnl/nt/ntevent.c index b045b0cdd23..38363ddc838 100644 --- a/reactos/ntoskrnl/nt/ntevent.c +++ b/reactos/ntoskrnl/nt/ntevent.c @@ -97,6 +97,7 @@ NtInitializeEventImplementation(VOID) ExEventObjectType->QueryName = NULL; ExEventObjectType->OkayToClose = NULL; ExEventObjectType->Create = NtpCreateEvent; + ExEventObjectType->DuplicationNotify = NULL; } diff --git a/reactos/ntoskrnl/nt/ntsem.c b/reactos/ntoskrnl/nt/ntsem.c index 58ee48ad0a3..c275f299faa 100644 --- a/reactos/ntoskrnl/nt/ntsem.c +++ b/reactos/ntoskrnl/nt/ntsem.c @@ -1,4 +1,4 @@ -/* $Id: ntsem.c,v 1.13 2001/08/26 17:29:36 ekohl Exp $ +/* $Id: ntsem.c,v 1.14 2001/12/05 01:40:25 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -78,6 +78,7 @@ VOID NtInitializeSemaphoreImplementation(VOID) ExSemaphoreType->QueryName = NULL; ExSemaphoreType->OkayToClose = NULL; ExSemaphoreType->Create = NtpCreateSemaphore; + ExSemaphoreType->DuplicationNotify = NULL; } NTSTATUS STDCALL diff --git a/reactos/ntoskrnl/nt/nttimer.c b/reactos/ntoskrnl/nt/nttimer.c index 2eeadfbc9b8..e3a80e3f20d 100644 --- a/reactos/ntoskrnl/nt/nttimer.c +++ b/reactos/ntoskrnl/nt/nttimer.c @@ -1,4 +1,4 @@ -/* $Id: nttimer.c,v 1.12 2001/09/06 22:47:39 dwelch Exp $ +/* $Id: nttimer.c,v 1.13 2001/12/05 01:40:25 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -125,6 +125,7 @@ VOID NtInitializeTimerImplementation(VOID) ExTimerType->QueryName = NULL; ExTimerType->OkayToClose = NULL; ExTimerType->Create = NtpCreateTimer; + ExTimerType->DuplicationNotify = NULL; } diff --git a/reactos/ntoskrnl/ob/namespc.c b/reactos/ntoskrnl/ob/namespc.c index 2761abde617..eaced98ca7a 100644 --- a/reactos/ntoskrnl/ob/namespc.c +++ b/reactos/ntoskrnl/ob/namespc.c @@ -1,4 +1,4 @@ -/* $Id: namespc.c,v 1.26 2001/08/26 17:29:57 ekohl Exp $ +/* $Id: namespc.c,v 1.27 2001/12/05 01:40:25 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -327,6 +327,7 @@ VOID ObInit(VOID) ObDirectoryType->QueryName = NULL; ObDirectoryType->OkayToClose = NULL; ObDirectoryType->Create = ObpCreateDirectory; + ObDirectoryType->DuplicationNotify = NULL; RtlInitUnicodeString(&ObDirectoryType->TypeName, L"Directory"); diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 8e04fbdb015..695b6854b06 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.70 2001/11/29 16:40:45 ekohl Exp $ +/* $Id: process.c,v 1.71 2001/12/05 01:40:25 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -212,6 +212,7 @@ PsInitProcessManagment(VOID) PsProcessType->QueryName = NULL; PsProcessType->OkayToClose = NULL; PsProcessType->Create = NULL; + PsProcessType->DuplicationNotify = NULL; RtlInitUnicodeString(&PsProcessType->TypeName, L"Process"); diff --git a/reactos/ntoskrnl/ps/thread.c b/reactos/ntoskrnl/ps/thread.c index 238cc128158..f3aa8d5774d 100644 --- a/reactos/ntoskrnl/ps/thread.c +++ b/reactos/ntoskrnl/ps/thread.c @@ -1,4 +1,4 @@ -/* $Id: thread.c,v 1.79 2001/09/06 22:47:39 dwelch Exp $ +/* $Id: thread.c,v 1.80 2001/12/05 01:40:25 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -369,6 +369,7 @@ PsInitThreadManagment(VOID) PsThreadType->QueryName = NULL; PsThreadType->OkayToClose = NULL; PsThreadType->Create = NULL; + PsThreadType->DuplicationNotify = NULL; PsInitializeThread(NULL,&FirstThread,&FirstThreadHandle, THREAD_ALL_ACCESS,NULL, TRUE); diff --git a/reactos/ntoskrnl/se/sd.c b/reactos/ntoskrnl/se/sd.c index 71c8020fde8..6665dacd2e8 100644 --- a/reactos/ntoskrnl/se/sd.c +++ b/reactos/ntoskrnl/se/sd.c @@ -1,4 +1,4 @@ -/* $Id: sd.c,v 1.4 2001/12/04 20:47:26 ekohl Exp $ +/* $Id: sd.c,v 1.5 2001/12/05 01:40:25 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -156,10 +156,10 @@ RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, } SecurityDescriptor->Control = SecurityDescriptor->Control | SE_DACL_PRESENT; SecurityDescriptor->Dacl = Dacl; - SecurityDescriptor->Control = SecurityDescriptor->Control & ~(SE_DACL_DEFALTED); + SecurityDescriptor->Control = SecurityDescriptor->Control & ~(SE_DACL_DEFAULTED); if (DaclDefaulted) { - SecurityDescriptor->Control = SecurityDescriptor->Control | SE_DACL_DEFALTED; + SecurityDescriptor->Control = SecurityDescriptor->Control | SE_DACL_DEFAULTED; } return(STATUS_SUCCESS); } diff --git a/reactos/ntoskrnl/se/token.c b/reactos/ntoskrnl/se/token.c index c8ebbfee91f..b657595be38 100644 --- a/reactos/ntoskrnl/se/token.c +++ b/reactos/ntoskrnl/se/token.c @@ -1,4 +1,4 @@ -/* $Id: token.c,v 1.11 2001/03/07 16:48:45 dwelch Exp $ +/* $Id: token.c,v 1.12 2001/12/05 01:40:25 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -244,7 +244,7 @@ VOID SeInitializeTokenManager(VOID) SeTokenType->QueryName = NULL; SeTokenType->OkayToClose = NULL; SeTokenType->Create = NULL; - + SeTokenType->DuplicationNotify = NULL; } NTSTATUS RtlCopySidAndAttributesArray(ULONG Count, // ebp + 8