[KERNEL32]: Complete rewrite of CreateProcessInternalW based on Server 2003, instead of the original version that I wrote based on Windows 2000. This new version adds the right CSRSS support for VDM and Wow32, stubs the upcoming support for SxS, uses the new NtCreateProcessEx functionality, adds checks for SDB/Shim/AppCompat, adds checks for SRP (the old AppLocker), adds support for image file execution options, such as large pages and the debugger key, adds licensing checks, adds better path handling using the path APIs that Thomas, Hermes, and Myself re-wrote/improved in Rtl/NTDLL, and a whole lot more. Tested with a bunch of launches, downloads, and apps, and no immediate regressions were seen, but this is 3500 lines of code and nothing is perfect. Please file Jira issues as they come up -- I will maintain & fix this. Will also ask Hermes to start working on the VDM/WoW32 paths for the new NTVDM work that's happening, and I will start looking at SxS.

svn path=/trunk/; revision=59637
This commit is contained in:
Alex Ionescu 2013-08-04 16:58:54 +00:00
parent 5ca2d9762b
commit d81cd01efc
3 changed files with 2143 additions and 836 deletions

File diff suppressed because it is too large Load diff

View file

@ -73,7 +73,8 @@ BaseCheckVDM(IN ULONG BinaryType,
IN PCSR_API_MESSAGE ApiMessage,
IN OUT PULONG iTask,
IN DWORD CreationFlags,
IN LPSTARTUPINFOW StartupInfo)
IN LPSTARTUPINFOW StartupInfo,
IN HANDLE hUserToken OPTIONAL)
{
/* This is not supported */
UNIMPLEMENTED;

View file

@ -410,13 +410,13 @@ BasepLocateExeLdrEntry(IN PLDR_DATA_TABLE_ENTRY Entry,
typedef NTSTATUS
(NTAPI *PBASEP_APPCERT_PLUGIN_FUNC)(
IN PCHAR ApplicationName,
IN LPWSTR ApplicationName,
IN ULONG CertFlag
);
typedef NTSTATUS
(NTAPI *PBASEP_APPCERT_EMBEDDED_FUNC)(
IN PCHAR ApplicationName
IN LPWSTR ApplicationName
);
typedef NTSTATUS
@ -491,6 +491,22 @@ BaseCheckForVDM(
OUT LPDWORD ExitCode
);
BOOL
WINAPI
BaseCheckVDM(
IN ULONG BinaryType,
IN PCWCH ApplicationName,
IN PCWCH CommandLine,
IN PCWCH CurrentDirectory,
IN PANSI_STRING AnsiEnvironment,
IN PCSR_API_MESSAGE ApiMessage,
IN OUT PULONG iTask,
IN DWORD CreationFlags,
IN LPSTARTUPINFOW StartupInfo,
IN HANDLE hUserToken OPTIONAL
);
/* FIXME: This is EXPORTED! It should go in an external kernel32.h header */
VOID
WINAPI
@ -498,3 +514,14 @@ BasepFreeAppCompatData(
IN PVOID AppCompatData,
IN PVOID AppCompatSxsData
);
NTSTATUS
WINAPI
BasepCheckWinSaferRestrictions(
IN HANDLE UserToken,
IN LPWSTR ApplicationName,
IN HANDLE FileHandle,
OUT PBOOLEAN InJob,
OUT PHANDLE NewToken,
OUT PHANDLE JobHandle
);