mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fixed token type initialization.
svn path=/trunk/; revision=2998
This commit is contained in:
parent
a31f8b8f88
commit
0fae9a2eac
3 changed files with 28 additions and 18 deletions
|
@ -101,6 +101,8 @@ BOOLEAN SepInitSecurityIDs(VOID);
|
|||
BOOLEAN SepInitDACLs(VOID);
|
||||
BOOLEAN SepInitSDs(VOID);
|
||||
|
||||
VOID SepInitializeTokenImplementation(VOID);
|
||||
|
||||
|
||||
NTSTATUS SeExchangePrimaryToken(struct _EPROCESS* Process,
|
||||
PACCESS_TOKEN NewToken,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: semgr.c,v 1.18 2002/02/20 20:15:38 ekohl Exp $
|
||||
/* $Id: semgr.c,v 1.19 2002/06/04 13:44:06 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -58,7 +58,9 @@ SeInit1(VOID)
|
|||
BOOLEAN
|
||||
SeInit2(VOID)
|
||||
{
|
||||
return TRUE;
|
||||
SeInitializeTokenImplementation();
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: token.c,v 1.14 2002/02/22 13:36:24 ekohl Exp $
|
||||
/* $Id: token.c,v 1.15 2002/06/04 13:44:06 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -216,10 +216,10 @@ SeImpersonateClient(IN PSECURITY_CLIENT_CONTEXT ClientContext,
|
|||
|
||||
|
||||
VOID
|
||||
SeInitializeTokenManager(VOID)
|
||||
SepInitializeTokenImplementation(VOID)
|
||||
{
|
||||
SepTokenObjectType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE));
|
||||
|
||||
|
||||
SepTokenObjectType->Tag = TAG('T', 'O', 'K', 'T');
|
||||
SepTokenObjectType->MaxObjects = ULONG_MAX;
|
||||
SepTokenObjectType->MaxHandles = ULONG_MAX;
|
||||
|
@ -238,10 +238,12 @@ SeInitializeTokenManager(VOID)
|
|||
SepTokenObjectType->OkayToClose = NULL;
|
||||
SepTokenObjectType->Create = NULL;
|
||||
SepTokenObjectType->DuplicationNotify = NULL;
|
||||
|
||||
RtlCreateUnicodeString(&SepTokenObjectType->TypeName,
|
||||
L"Token");
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
RtlCopySidAndAttributesArray(ULONG Count, // ebp + 8
|
||||
PSID_AND_ATTRIBUTES Src, // ebp + C
|
||||
|
@ -606,25 +608,29 @@ NtCreateToken(OUT PHANDLE TokenHandle,
|
|||
IN PTOKEN_DEFAULT_DACL TokenDefaultDacl,
|
||||
IN PTOKEN_SOURCE TokenSource)
|
||||
{
|
||||
PACCESS_TOKEN AccessToken;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = ObCreateObject(TokenHandle,
|
||||
DesiredAccess,
|
||||
ObjectAttributes,
|
||||
SepTokenObjectType,
|
||||
(PVOID*)&AccessToken);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("ObCreateObject() failed (Status %lx)\n");
|
||||
return(Status);
|
||||
}
|
||||
|
||||
#if 0
|
||||
PACCESS_TOKEN AccessToken;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = ObCreateObject(TokenHandle,
|
||||
DesiredAccess,
|
||||
ObjectAttributes,
|
||||
SeTokenType);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return(Status);
|
||||
}
|
||||
|
||||
AccessToken->TokenType = TokenType;
|
||||
RtlCopyLuid(&AccessToken->AuthenticationId, AuthenticationId);
|
||||
AccessToken->ExpirationTime = *ExpirationTime;
|
||||
AccessToken->
|
||||
#endif
|
||||
UNIMPLEMENTED;
|
||||
// UNIMPLEMENTED;
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue