AnsiDest,
UniSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
UniDest,
OemSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
OemDest,
UniSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
UniDest,
OemSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
OemDest,
UniSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
/*
UniDest,
UniSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
AnsiDest,
UniSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
/*
OemDest,
UniSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
OemDest,
UniSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
{
DPRINT("RtlCreateUnicodeString\n");
- return RtlpCreateUnicodeString(UniDest, Source, NonPagedPool);
+ return RtlpCreateUnicodeString(UniDest, Source, PagedPool);
}
ULONG Length;
Length = (wcslen (Source) + 1) * sizeof(WCHAR);
-
+ PoolType = PagedPool;
UniDest->Buffer = ExAllocatePoolWithTag(PoolType, Length, TAG_USTR);
if (UniDest->Buffer == NULL)
return FALSE;
UniDest,
UniSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
UniDest,
AnsiSource,
AllocateDestinationString,
- NonPagedPool);
+ PagedPool);
}
AddNull,
SourceString,
DestinationString,
- NonPagedPool);
+ PagedPool);
}
RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer));
RtlInitUnicodeString(&Name, L"Key");
ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
- ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(KEY_OBJECT);
+ ObjectTypeInitializer.DefaultPagedPoolCharge = sizeof(KEY_OBJECT);
ObjectTypeInitializer.GenericMapping = CmiKeyMapping;
- ObjectTypeInitializer.PoolType = NonPagedPool;
+ ObjectTypeInitializer.PoolType = PagedPool;
ObjectTypeInitializer.ValidAccessMask = KEY_ALL_ACCESS;
ObjectTypeInitializer.UseDefaultObject = TRUE;
ObjectTypeInitializer.DeleteProcedure = CmiObjectDelete;
VOID FASTCALL
ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
{
- ASSERT(FastMutex->Owner != KeGetCurrentThread());
+ //ASSERT(FastMutex->Owner != KeGetCurrentThread());
InterlockedIncrementUL(&FastMutex->Contention);
while (InterlockedExchange(&FastMutex->Count, 0) == 0)
{
VOID FASTCALL
ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex)
{
- ASSERT(FastMutex->Owner == KeGetCurrentThread());
+ //ASSERT(FastMutex->Owner == KeGetCurrentThread());
FastMutex->Owner = NULL;
InterlockedExchange(&FastMutex->Count, 1);
if (FastMutex->Contention > 0)
/* Set 1 CPU for now, we'll increment this later */
KeNumberProcessors = 1;
-
+
/* Initalize the Process Manager */
PiInitProcessManager();
-
+
/* Break into the Debugger if requested */
if (KdPollBreakIn()) DbgBreakPointWithStatus (DBG_STATUS_CONTROL_C);
#define TAG_HDTB TAG('H', 'D', 'T', 'B')
/* formerly located in se/acl.c */
-#define TAG_ACL TAG('A', 'C', 'L', 'T')
-
-/* formerly located in se/semgr.c */
-#define TAG_SXPT TAG('S', 'X', 'P', 'T')
+#define TAG_ACL TAG('S', 'e', 'A', 'c')
/* formerly located in se/sid.c */
-#define TAG_SID TAG('S', 'I', 'D', 'T')
+#define TAG_SID TAG('S', 'e', 'S', 'i')
+
+/* formerly located in se/sd.c */
+#define TAG_SD TAG('S', 'e', 'S', 'd')
#endif /* _NTOSKRNL_TAG_H */
}
if (PsGetCurrentProcess() == NULL)
{
+ /* Allow this! It lets us page alloc much earlier! It won't be needed
+ * after my init patch anyways
+ */
DbgPrint("No current process\n");
- return(STATUS_UNSUCCESSFUL);
+ //return(STATUS_UNSUCCESSFUL);
}
/*
RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer));
RtlInitUnicodeString(&Name, L"Section");
ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
- ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(SECTION_OBJECT);
- ObjectTypeInitializer.PoolType = NonPagedPool;
+ ObjectTypeInitializer.DefaultPagedPoolCharge = sizeof(SECTION_OBJECT);
+ ObjectTypeInitializer.PoolType = PagedPool;
ObjectTypeInitializer.UseDefaultObject = TRUE;
ObjectTypeInitializer.GenericMapping = MmpSectionMapping;
ObjectTypeInitializer.DeleteProcedure = MmpDeleteSection;
/* TODO: check for integer overflow */
SizeOfSegments = sizeof(MM_SECTION_SEGMENT) * NrSegments;
- Segments = ExAllocatePoolWithTag(NonPagedPool,
+ Segments = ExAllocatePoolWithTag(PagedPool,
SizeOfSegments,
TAG_MM_SECTION_SEGMENT);
{
/* allocate handle array */
ArraySize = sizeof(RTL_HANDLE) * HandleTable->TableSize;
- ArrayPointer = ExAllocatePoolWithTag(NonPagedPool,
+ ArrayPointer = ExAllocatePoolWithTag(PagedPool,
ArraySize,
TAG_HDTB);
if (ArrayPointer == NULL)
(sizeof(ACE) + RtlLengthSid(SeWorldSid)) +
(sizeof(ACE) + RtlLengthSid(SeLocalSystemSid));
- SePublicDefaultDacl = ExAllocatePoolWithTag(NonPagedPool,
+ SePublicDefaultDacl = ExAllocatePoolWithTag(PagedPool,
AclLength,
TAG_ACL);
if (SePublicDefaultDacl == NULL)
(sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid)) +
(sizeof(ACE) + RtlLengthSid(SeRestrictedCodeSid));
- SePublicDefaultUnrestrictedDacl = ExAllocatePoolWithTag(NonPagedPool,
+ SePublicDefaultUnrestrictedDacl = ExAllocatePoolWithTag(PagedPool,
AclLength,
TAG_ACL);
if (SePublicDefaultUnrestrictedDacl == NULL)
(sizeof(ACE) + RtlLengthSid(SeLocalSystemSid)) +
(sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid));
- SePublicOpenDacl = ExAllocatePoolWithTag(NonPagedPool,
+ SePublicOpenDacl = ExAllocatePoolWithTag(PagedPool,
AclLength,
TAG_ACL);
if (SePublicOpenDacl == NULL)
(sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid)) +
(sizeof(ACE) + RtlLengthSid(SeRestrictedCodeSid));
- SePublicOpenUnrestrictedDacl = ExAllocatePoolWithTag(NonPagedPool,
+ SePublicOpenUnrestrictedDacl = ExAllocatePoolWithTag(PagedPool,
AclLength,
TAG_ACL);
if (SePublicOpenUnrestrictedDacl == NULL)
(sizeof(ACE) + RtlLengthSid(SeLocalSystemSid)) +
(sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid));
- SeSystemDefaultDacl = ExAllocatePoolWithTag(NonPagedPool,
+ SeSystemDefaultDacl = ExAllocatePoolWithTag(PagedPool,
AclLength,
TAG_ACL);
if (SeSystemDefaultDacl == NULL)
(sizeof(ACE) + RtlLengthSid(SeWorldSid)) +
(sizeof(ACE) + RtlLengthSid(SeRestrictedCodeSid));
- SeUnrestrictedDacl = ExAllocatePoolWithTag(NonPagedPool,
+ SeUnrestrictedDacl = ExAllocatePoolWithTag(PagedPool,
AclLength,
TAG_ACL);
if (SeUnrestrictedDacl == NULL)
SepInitSDs(VOID)
{
/* Create PublicDefaultSd */
- SePublicDefaultSd = ExAllocatePool(NonPagedPool,
- sizeof(SECURITY_DESCRIPTOR));
+ SePublicDefaultSd = ExAllocatePoolWithTag(PagedPool,
+ sizeof(SECURITY_DESCRIPTOR), TAG_SD);
if (SePublicDefaultSd == NULL)
return FALSE;
FALSE);
/* Create PublicDefaultUnrestrictedSd */
- SePublicDefaultUnrestrictedSd = ExAllocatePool(NonPagedPool,
- sizeof(SECURITY_DESCRIPTOR));
+ SePublicDefaultUnrestrictedSd = ExAllocatePoolWithTag(PagedPool,
+ sizeof(SECURITY_DESCRIPTOR), TAG_SD);
if (SePublicDefaultUnrestrictedSd == NULL)
return FALSE;
FALSE);
/* Create PublicOpenSd */
- SePublicOpenSd = ExAllocatePool(NonPagedPool,
- sizeof(SECURITY_DESCRIPTOR));
+ SePublicOpenSd = ExAllocatePoolWithTag(PagedPool,
+ sizeof(SECURITY_DESCRIPTOR), TAG_SD);
if (SePublicOpenSd == NULL)
return FALSE;
FALSE);
/* Create PublicOpenUnrestrictedSd */
- SePublicOpenUnrestrictedSd = ExAllocatePool(NonPagedPool,
- sizeof(SECURITY_DESCRIPTOR));
+ SePublicOpenUnrestrictedSd = ExAllocatePoolWithTag(PagedPool,
+ sizeof(SECURITY_DESCRIPTOR), TAG_SD);
if (SePublicOpenUnrestrictedSd == NULL)
return FALSE;
FALSE);
/* Create SystemDefaultSd */
- SeSystemDefaultSd = ExAllocatePool(NonPagedPool,
- sizeof(SECURITY_DESCRIPTOR));
+ SeSystemDefaultSd = ExAllocatePoolWithTag(PagedPool,
+ sizeof(SECURITY_DESCRIPTOR), TAG_SD);
if (SeSystemDefaultSd == NULL)
return FALSE;
FALSE);
/* Create UnrestrictedSd */
- SeUnrestrictedSd = ExAllocatePool(NonPagedPool,
- sizeof(SECURITY_DESCRIPTOR));
+ SeUnrestrictedSd = ExAllocatePoolWithTag(PagedPool,
+ sizeof(SECURITY_DESCRIPTOR), TAG_SD);
if (SeUnrestrictedSd == NULL)
return FALSE;
/* GLOBALS ******************************************************************/
PSE_EXPORTS EXPORTED SeExports = NULL;
+SE_EXPORTS SepExports;
static ERESOURCE SepSubjectContextLock;
static BOOLEAN INIT_FUNCTION
SepInitExports(VOID)
{
- SeExports = ExAllocatePoolWithTag(NonPagedPool,
- sizeof(SE_EXPORTS),
- TAG_SXPT);
- if (SeExports == NULL)
- return FALSE;
-
- SeExports->SeCreateTokenPrivilege = SeCreateTokenPrivilege;
- SeExports->SeAssignPrimaryTokenPrivilege = SeAssignPrimaryTokenPrivilege;
- SeExports->SeLockMemoryPrivilege = SeLockMemoryPrivilege;
- SeExports->SeIncreaseQuotaPrivilege = SeIncreaseQuotaPrivilege;
- SeExports->SeUnsolicitedInputPrivilege = SeUnsolicitedInputPrivilege;
- SeExports->SeTcbPrivilege = SeTcbPrivilege;
- SeExports->SeSecurityPrivilege = SeSecurityPrivilege;
- SeExports->SeTakeOwnershipPrivilege = SeTakeOwnershipPrivilege;
- SeExports->SeLoadDriverPrivilege = SeLoadDriverPrivilege;
- SeExports->SeCreatePagefilePrivilege = SeCreatePagefilePrivilege;
- SeExports->SeIncreaseBasePriorityPrivilege = SeIncreaseBasePriorityPrivilege;
- SeExports->SeSystemProfilePrivilege = SeSystemProfilePrivilege;
- SeExports->SeSystemtimePrivilege = SeSystemtimePrivilege;
- SeExports->SeProfileSingleProcessPrivilege = SeProfileSingleProcessPrivilege;
- SeExports->SeCreatePermanentPrivilege = SeCreatePermanentPrivilege;
- SeExports->SeBackupPrivilege = SeBackupPrivilege;
- SeExports->SeRestorePrivilege = SeRestorePrivilege;
- SeExports->SeShutdownPrivilege = SeShutdownPrivilege;
- SeExports->SeDebugPrivilege = SeDebugPrivilege;
- SeExports->SeAuditPrivilege = SeAuditPrivilege;
- SeExports->SeSystemEnvironmentPrivilege = SeSystemEnvironmentPrivilege;
- SeExports->SeChangeNotifyPrivilege = SeChangeNotifyPrivilege;
- SeExports->SeRemoteShutdownPrivilege = SeRemoteShutdownPrivilege;
-
- SeExports->SeNullSid = SeNullSid;
- SeExports->SeWorldSid = SeWorldSid;
- SeExports->SeLocalSid = SeLocalSid;
- SeExports->SeCreatorOwnerSid = SeCreatorOwnerSid;
- SeExports->SeCreatorGroupSid = SeCreatorGroupSid;
- SeExports->SeNtAuthoritySid = SeNtAuthoritySid;
- SeExports->SeDialupSid = SeDialupSid;
- SeExports->SeNetworkSid = SeNetworkSid;
- SeExports->SeBatchSid = SeBatchSid;
- SeExports->SeInteractiveSid = SeInteractiveSid;
- SeExports->SeLocalSystemSid = SeLocalSystemSid;
- SeExports->SeAliasAdminsSid = SeAliasAdminsSid;
- SeExports->SeAliasUsersSid = SeAliasUsersSid;
- SeExports->SeAliasGuestsSid = SeAliasGuestsSid;
- SeExports->SeAliasPowerUsersSid = SeAliasPowerUsersSid;
- SeExports->SeAliasAccountOpsSid = SeAliasAccountOpsSid;
- SeExports->SeAliasSystemOpsSid = SeAliasSystemOpsSid;
- SeExports->SeAliasPrintOpsSid = SeAliasPrintOpsSid;
- SeExports->SeAliasBackupOpsSid = SeAliasBackupOpsSid;
-
+ SepExports.SeCreateTokenPrivilege = SeCreateTokenPrivilege;
+ SepExports.SeAssignPrimaryTokenPrivilege = SeAssignPrimaryTokenPrivilege;
+ SepExports.SeLockMemoryPrivilege = SeLockMemoryPrivilege;
+ SepExports.SeIncreaseQuotaPrivilege = SeIncreaseQuotaPrivilege;
+ SepExports.SeUnsolicitedInputPrivilege = SeUnsolicitedInputPrivilege;
+ SepExports.SeTcbPrivilege = SeTcbPrivilege;
+ SepExports.SeSecurityPrivilege = SeSecurityPrivilege;
+ SepExports.SeTakeOwnershipPrivilege = SeTakeOwnershipPrivilege;
+ SepExports.SeLoadDriverPrivilege = SeLoadDriverPrivilege;
+ SepExports.SeCreatePagefilePrivilege = SeCreatePagefilePrivilege;
+ SepExports.SeIncreaseBasePriorityPrivilege = SeIncreaseBasePriorityPrivilege;
+ SepExports.SeSystemProfilePrivilege = SeSystemProfilePrivilege;
+ SepExports.SeSystemtimePrivilege = SeSystemtimePrivilege;
+ SepExports.SeProfileSingleProcessPrivilege = SeProfileSingleProcessPrivilege;
+ SepExports.SeCreatePermanentPrivilege = SeCreatePermanentPrivilege;
+ SepExports.SeBackupPrivilege = SeBackupPrivilege;
+ SepExports.SeRestorePrivilege = SeRestorePrivilege;
+ SepExports.SeShutdownPrivilege = SeShutdownPrivilege;
+ SepExports.SeDebugPrivilege = SeDebugPrivilege;
+ SepExports.SeAuditPrivilege = SeAuditPrivilege;
+ SepExports.SeSystemEnvironmentPrivilege = SeSystemEnvironmentPrivilege;
+ SepExports.SeChangeNotifyPrivilege = SeChangeNotifyPrivilege;
+ SepExports.SeRemoteShutdownPrivilege = SeRemoteShutdownPrivilege;
+
+ SepExports.SeNullSid = SeNullSid;
+ SepExports.SeWorldSid = SeWorldSid;
+ SepExports.SeLocalSid = SeLocalSid;
+ SepExports.SeCreatorOwnerSid = SeCreatorOwnerSid;
+ SepExports.SeCreatorGroupSid = SeCreatorGroupSid;
+ SepExports.SeNtAuthoritySid = SeNtAuthoritySid;
+ SepExports.SeDialupSid = SeDialupSid;
+ SepExports.SeNetworkSid = SeNetworkSid;
+ SepExports.SeBatchSid = SeBatchSid;
+ SepExports.SeInteractiveSid = SeInteractiveSid;
+ SepExports.SeLocalSystemSid = SeLocalSystemSid;
+ SepExports.SeAliasAdminsSid = SeAliasAdminsSid;
+ SepExports.SeAliasUsersSid = SeAliasUsersSid;
+ SepExports.SeAliasGuestsSid = SeAliasGuestsSid;
+ SepExports.SeAliasPowerUsersSid = SeAliasPowerUsersSid;
+ SepExports.SeAliasAccountOpsSid = SeAliasAccountOpsSid;
+ SepExports.SeAliasSystemOpsSid = SeAliasSystemOpsSid;
+ SepExports.SeAliasPrintOpsSid = SeAliasPrintOpsSid;
+ SepExports.SeAliasBackupOpsSid = SeAliasBackupOpsSid;
+
+ SeExports = &SepExports;
return TRUE;
}
DaclLength,
SaclLength);
- Descriptor = ExAllocatePool(NonPagedPool,
+ Descriptor = ExAllocatePool(PagedPool,
Length);
RtlZeroMemory( Descriptor, Length );
SidLength2 = RtlLengthRequiredSid(2);
/* create NullSid */
- SeNullSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeNullSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeNullSid == NULL)
*SubAuthority = SECURITY_NULL_RID;
/* create WorldSid */
- SeWorldSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeWorldSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeWorldSid == NULL)
*SubAuthority = SECURITY_WORLD_RID;
/* create LocalSid */
- SeLocalSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeLocalSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeLocalSid == NULL)
*SubAuthority = SECURITY_LOCAL_RID;
/* create CreatorOwnerSid */
- SeCreatorOwnerSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeCreatorOwnerSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeCreatorOwnerSid == NULL)
*SubAuthority = SECURITY_CREATOR_OWNER_RID;
/* create CreatorGroupSid */
- SeCreatorGroupSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeCreatorGroupSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeCreatorGroupSid == NULL)
*SubAuthority = SECURITY_CREATOR_GROUP_RID;
/* create CreatorOwnerServerSid */
- SeCreatorOwnerServerSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeCreatorOwnerServerSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeCreatorOwnerServerSid == NULL)
*SubAuthority = SECURITY_CREATOR_OWNER_SERVER_RID;
/* create CreatorGroupServerSid */
- SeCreatorGroupServerSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeCreatorGroupServerSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeCreatorGroupServerSid == NULL)
/* create NtAuthoritySid */
- SeNtAuthoritySid = ExAllocatePoolWithTag(NonPagedPool,
+ SeNtAuthoritySid = ExAllocatePoolWithTag(PagedPool,
SidLength0,
TAG_SID);
if (SeNtAuthoritySid == NULL)
0);
/* create DialupSid */
- SeDialupSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeDialupSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeDialupSid == NULL)
*SubAuthority = SECURITY_DIALUP_RID;
/* create NetworkSid */
- SeNetworkSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeNetworkSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeNetworkSid == NULL)
*SubAuthority = SECURITY_NETWORK_RID;
/* create BatchSid */
- SeBatchSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeBatchSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeBatchSid == NULL)
*SubAuthority = SECURITY_BATCH_RID;
/* create InteractiveSid */
- SeInteractiveSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeInteractiveSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeInteractiveSid == NULL)
*SubAuthority = SECURITY_INTERACTIVE_RID;
/* create ServiceSid */
- SeServiceSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeServiceSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeServiceSid == NULL)
*SubAuthority = SECURITY_SERVICE_RID;
/* create AnonymousLogonSid */
- SeAnonymousLogonSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAnonymousLogonSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeAnonymousLogonSid == NULL)
*SubAuthority = SECURITY_ANONYMOUS_LOGON_RID;
/* create PrincipalSelfSid */
- SePrincipalSelfSid = ExAllocatePoolWithTag(NonPagedPool,
+ SePrincipalSelfSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SePrincipalSelfSid == NULL)
*SubAuthority = SECURITY_PRINCIPAL_SELF_RID;
/* create LocalSystemSid */
- SeLocalSystemSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeLocalSystemSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeLocalSystemSid == NULL)
*SubAuthority = SECURITY_LOCAL_SYSTEM_RID;
/* create AuthenticatedUserSid */
- SeAuthenticatedUserSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAuthenticatedUserSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeAuthenticatedUserSid == NULL)
*SubAuthority = SECURITY_AUTHENTICATED_USER_RID;
/* create RestrictedCodeSid */
- SeRestrictedCodeSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeRestrictedCodeSid = ExAllocatePoolWithTag(PagedPool,
SidLength1,
TAG_SID);
if (SeRestrictedCodeSid == NULL)
*SubAuthority = SECURITY_RESTRICTED_CODE_RID;
/* create AliasAdminsSid */
- SeAliasAdminsSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAliasAdminsSid = ExAllocatePoolWithTag(PagedPool,
SidLength2,
TAG_SID);
if (SeAliasAdminsSid == NULL)
*SubAuthority = DOMAIN_ALIAS_RID_ADMINS;
/* create AliasUsersSid */
- SeAliasUsersSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAliasUsersSid = ExAllocatePoolWithTag(PagedPool,
SidLength2,
TAG_SID);
if (SeAliasUsersSid == NULL)
*SubAuthority = DOMAIN_ALIAS_RID_USERS;
/* create AliasGuestsSid */
- SeAliasGuestsSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAliasGuestsSid = ExAllocatePoolWithTag(PagedPool,
SidLength2,
TAG_SID);
if (SeAliasGuestsSid == NULL)
*SubAuthority = DOMAIN_ALIAS_RID_GUESTS;
/* create AliasPowerUsersSid */
- SeAliasPowerUsersSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAliasPowerUsersSid = ExAllocatePoolWithTag(PagedPool,
SidLength2,
TAG_SID);
if (SeAliasPowerUsersSid == NULL)
*SubAuthority = DOMAIN_ALIAS_RID_POWER_USERS;
/* create AliasAccountOpsSid */
- SeAliasAccountOpsSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAliasAccountOpsSid = ExAllocatePoolWithTag(PagedPool,
SidLength2,
TAG_SID);
if (SeAliasAccountOpsSid == NULL)
*SubAuthority = DOMAIN_ALIAS_RID_ACCOUNT_OPS;
/* create AliasSystemOpsSid */
- SeAliasSystemOpsSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAliasSystemOpsSid = ExAllocatePoolWithTag(PagedPool,
SidLength2,
TAG_SID);
if (SeAliasSystemOpsSid == NULL)
*SubAuthority = DOMAIN_ALIAS_RID_SYSTEM_OPS;
/* create AliasPrintOpsSid */
- SeAliasPrintOpsSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAliasPrintOpsSid = ExAllocatePoolWithTag(PagedPool,
SidLength2,
TAG_SID);
if (SeAliasPrintOpsSid == NULL)
*SubAuthority = DOMAIN_ALIAS_RID_PRINT_OPS;
/* create AliasBackupOpsSid */
- SeAliasBackupOpsSid = ExAllocatePoolWithTag(NonPagedPool,
+ SeAliasBackupOpsSid = ExAllocatePoolWithTag(PagedPool,
SidLength2,
TAG_SID);
if (SeAliasBackupOpsSid == NULL)
RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer));
RtlInitUnicodeString(&Name, L"Token");
ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
- ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(TOKEN);
+ ObjectTypeInitializer.DefaultPagedPoolCharge = sizeof(TOKEN);
ObjectTypeInitializer.GenericMapping = SepTokenMapping;
- ObjectTypeInitializer.PoolType = NonPagedPool;
+ ObjectTypeInitializer.PoolType = PagedPool;
ObjectTypeInitializer.ValidAccessMask = TOKEN_ALL_ACCESS;
ObjectTypeInitializer.UseDefaultObject = TRUE;
ObjectTypeInitializer.DeleteProcedure = SepDeleteToken;
uSize += uAdminsLength;
AccessToken->UserAndGroups =
- (PSID_AND_ATTRIBUTES)ExAllocatePoolWithTag(NonPagedPool,
+ (PSID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool,
uSize,
TAG('T', 'O', 'K', 'u'));
SidArea = &AccessToken->UserAndGroups[AccessToken->UserAndGroupCount];
uSize = AccessToken->PrivilegeCount * sizeof(LUID_AND_ATTRIBUTES);
AccessToken->Privileges =
- (PLUID_AND_ATTRIBUTES)ExAllocatePoolWithTag(NonPagedPool,
+ (PLUID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool,
uSize,
TAG('T', 'O', 'K', 'p'));
uSize += sizeof(ACE) + uAdminsLength;
uSize = (uSize & (~3)) + 8;
AccessToken->DefaultDacl =
- (PACL) ExAllocatePoolWithTag(NonPagedPool,
+ (PACL) ExAllocatePoolWithTag(PagedPool,
uSize,
TAG('T', 'O', 'K', 'd'));
Status = RtlCreateAcl(AccessToken->DefaultDacl, uSize, ACL_REVISION);