[NTOSKRNL]

- Export SeTokenObjectType

svn path=/trunk/; revision=56376
This commit is contained in:
Thomas Faber 2012-04-21 06:35:45 +00:00
parent dd414ba20f
commit 4b9b72182c
6 changed files with 18 additions and 19 deletions

View File

@ -1,7 +1,5 @@
#pragma once
extern POBJECT_TYPE SepTokenObjectType;
/* SID Authorities */
extern SID_IDENTIFIER_AUTHORITY SeNullSidAuthority;
extern SID_IDENTIFIER_AUTHORITY SeWorldSidAuthority;

View File

@ -1384,6 +1384,7 @@
@ stdcall SeTokenIsAdmin(ptr)
@ stdcall SeTokenIsRestricted(ptr)
@ stdcall SeTokenIsWriteRestricted(ptr)
@ extern SeTokenObjectType
@ stdcall SeTokenType(ptr)
@ stdcall SeUnlockSubjectContext(ptr)
@ stdcall SeUnregisterLogonSessionTerminatedRoutine(ptr)

View File

@ -190,7 +190,7 @@ PspAssignPrimaryToken(IN PEPROCESS Process,
/* Reference it from the handle */
Status = ObReferenceObjectByHandle(Token,
TOKEN_ASSIGN_PRIMARY,
SepTokenObjectType,
SeTokenObjectType,
ExGetPreviousMode(),
&NewToken,
NULL);
@ -231,7 +231,7 @@ PspSetPrimaryToken(IN PEPROCESS Process,
/* Reference it */
Status = ObReferenceObjectByHandle(TokenHandle,
TOKEN_ASSIGN_PRIMARY,
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
(PVOID*)&NewToken,
NULL);
@ -380,7 +380,7 @@ NtOpenProcessTokenEx(IN HANDLE ProcessHandle,
HandleAttributes,
NULL,
DesiredAccess,
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
&hToken);
ObDereferenceObject(Token);
@ -494,7 +494,7 @@ PsAssignImpersonationToken(IN PETHREAD Thread,
/* Get the token object */
Status = ObReferenceObjectByHandle(TokenHandle,
TOKEN_IMPERSONATE,
SepTokenObjectType,
SeTokenObjectType,
KeGetPreviousMode(),
(PVOID*)&Token,
NULL);

View File

@ -531,7 +531,7 @@ NtPrivilegeCheck(IN HANDLE ClientToken,
not doing an anonymous impersonation */
Status = ObReferenceObjectByHandle(ClientToken,
TOKEN_QUERY,
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
(PVOID*)&Token,
NULL);

View File

@ -947,7 +947,7 @@ NtAccessCheck(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
/* Reference the token */
Status = ObReferenceObjectByHandle(TokenHandle,
TOKEN_QUERY,
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
(PVOID*)&Token,
NULL);

View File

@ -19,7 +19,7 @@
/* GLOBALS ********************************************************************/
POBJECT_TYPE SepTokenObjectType = NULL;
POBJECT_TYPE SeTokenObjectType = NULL;
ERESOURCE SepTokenLock;
TOKEN_SOURCE SeSystemTokenSource = {"*SYSTEM*", {0}};
@ -240,7 +240,7 @@ SepDuplicateToken(PTOKEN Token,
PAGED_CODE();
Status = ObCreateObject(PreviousMode,
SepTokenObjectType,
SeTokenObjectType,
ObjectAttributes,
PreviousMode,
NULL,
@ -494,7 +494,7 @@ SepInitializeTokenImplementation(VOID)
ObjectTypeInitializer.ValidAccessMask = TOKEN_ALL_ACCESS;
ObjectTypeInitializer.UseDefaultObject = TRUE;
ObjectTypeInitializer.DeleteProcedure = SepDeleteToken;
ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &SepTokenObjectType);
ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &SeTokenObjectType);
}
VOID
@ -588,7 +588,7 @@ SepCreateToken(OUT PHANDLE TokenHandle,
return Status;
Status = ObCreateObject(PreviousMode,
SepTokenObjectType,
SeTokenObjectType,
ObjectAttributes,
PreviousMode,
NULL,
@ -1035,7 +1035,7 @@ NtQueryInformationToken(IN HANDLE TokenHandle,
Status = ObReferenceObjectByHandle(TokenHandle,
(TokenInformationClass == TokenSource) ? TOKEN_QUERY_SOURCE : TOKEN_QUERY,
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
(PVOID*)&Token,
NULL);
@ -1602,7 +1602,7 @@ NtSetInformationToken(IN HANDLE TokenHandle,
Status = ObReferenceObjectByHandle(TokenHandle,
NeededAccess,
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
(PVOID*)&Token,
NULL);
@ -1845,7 +1845,7 @@ NtDuplicateToken(IN HANDLE ExistingTokenHandle,
Status = ObReferenceObjectByHandle(ExistingTokenHandle,
TOKEN_DUPLICATE,
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
(PVOID*)&Token,
&HandleInformation);
@ -2047,7 +2047,7 @@ NtAdjustPrivilegesToken(IN HANDLE TokenHandle,
/* Reference the token */
Status = ObReferenceObjectByHandle(TokenHandle,
TOKEN_ADJUST_PRIVILEGES | (PreviousState != NULL ? TOKEN_QUERY : 0),
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
(PVOID*)&Token,
NULL);
@ -2474,7 +2474,7 @@ NtOpenThreadTokenEx(IN HANDLE ThreadHandle,
else
{
Status = ObOpenObjectByPointer(Token, HandleAttributes,
NULL, DesiredAccess, SepTokenObjectType,
NULL, DesiredAccess, SeTokenObjectType,
PreviousMode, &hToken);
}
@ -2561,7 +2561,7 @@ NtCompareTokens(IN HANDLE FirstTokenHandle,
Status = ObReferenceObjectByHandle(FirstTokenHandle,
TOKEN_QUERY,
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
(PVOID*)&FirstToken,
NULL);
@ -2570,7 +2570,7 @@ NtCompareTokens(IN HANDLE FirstTokenHandle,
Status = ObReferenceObjectByHandle(SecondTokenHandle,
TOKEN_QUERY,
SepTokenObjectType,
SeTokenObjectType,
PreviousMode,
(PVOID*)&SecondToken,
NULL);