Commit a3d9c487 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Load builtin exe without a corresponding file only before the prefix is fully initialized.

parent 726cf9c0
......@@ -118,6 +118,7 @@ static char *argv0;
static const char *bin_dir;
static const char *dll_dir;
static SIZE_T dll_path_maxlen;
static BOOL is_prefix_bootstrap;
const char *home_dir = NULL;
const char *data_dir = NULL;
......@@ -310,6 +311,8 @@ static void set_config_dir(void)
static void init_paths( char *argv[] )
{
Dl_info info;
struct stat st;
char *ntdll;
argv0 = strdup( argv[0] );
......@@ -332,6 +335,10 @@ static void init_paths( char *argv[] )
set_dll_path();
set_home_dir();
set_config_dir();
ntdll = build_path( config_dir, "dosdevices/c:/windows/system32/ntdll.dll" );
is_prefix_bootstrap = stat( ntdll, &st ) == -1;
free( ntdll );
}
......@@ -1456,6 +1463,8 @@ BOOL is_builtin_path( const UNICODE_STRING *path, WORD *machine )
's','y','s','w','o','w','6','4'};
unsigned int len;
if (!is_prefix_bootstrap) return FALSE;
*machine = current_machine;
if (path->Length > wcslen(system_dir) * sizeof(WCHAR) &&
!wcsnicmp( path->Buffer, system_dir, wcslen(system_dir) ))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment