mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
Check subsystem
svn path=/trunk/; revision=13501
This commit is contained in:
parent
3cc5374fe1
commit
18e42fda45
1 changed files with 11 additions and 0 deletions
|
@ -1023,6 +1023,7 @@ CreateProcessW
|
|||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
NtClose(hSection);
|
||||
DPRINT("Unable to get SectionImageInformation, status 0x%x\n", Status);
|
||||
SetLastErrorByStatus(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1030,10 +1031,20 @@ CreateProcessW
|
|||
if (0 != (Sii.Characteristics & IMAGE_FILE_DLL))
|
||||
{
|
||||
NtClose(hSection);
|
||||
DPRINT("Can't execute a DLL\n");
|
||||
SetLastError(ERROR_BAD_EXE_FORMAT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (IMAGE_SUBSYSTEM_WINDOWS_GUI != Sii.Subsystem
|
||||
&& IMAGE_SUBSYSTEM_WINDOWS_CUI != Sii.Subsystem)
|
||||
{
|
||||
NtClose(hSection);
|
||||
DPRINT("Invalid subsystem %d\n", Sii.Subsystem);
|
||||
SetLastError(ERROR_CHILD_NOT_COMPLETE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the process object attributes
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue