mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[NTOSKRNL] Check that caller has appropriate right before creating page file
This commit is contained in:
parent
2bbac12427
commit
0ad4ef6002
1 changed files with 6 additions and 1 deletions
|
@ -509,13 +509,18 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
|||
|
||||
if (MmNumberOfPagingFiles >= MAX_PAGING_FILES)
|
||||
{
|
||||
return(STATUS_TOO_MANY_PAGING_FILES);
|
||||
return STATUS_TOO_MANY_PAGING_FILES;
|
||||
}
|
||||
|
||||
PreviousMode = ExGetPreviousMode();
|
||||
|
||||
if (PreviousMode != KernelMode)
|
||||
{
|
||||
if (SeSinglePrivilegeCheck(SeCreatePagefilePrivilege, PreviousMode) != TRUE)
|
||||
{
|
||||
return STATUS_PRIVILEGE_NOT_HELD;
|
||||
}
|
||||
|
||||
_SEH2_TRY
|
||||
{
|
||||
SafeInitialSize = ProbeForReadLargeInteger(InitialSize);
|
||||
|
|
Loading…
Reference in a new issue