Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
96710025
Commit
96710025
authored
Mar 25, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Check the main image for Unix path only the first time around.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50858
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
15a6ee94
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
env.c
dlls/ntdll/unix/env.c
+3
-3
loader.c
dlls/ntdll/unix/loader.c
+4
-4
unix_private.h
dlls/ntdll/unix/unix_private.h
+2
-2
No files found.
dlls/ntdll/unix/env.c
View file @
96710025
...
...
@@ -1871,7 +1871,7 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params(void)
add_registry_environment
(
&
env
,
&
env_pos
,
&
env_size
);
env
[
env_pos
++
]
=
0
;
status
=
load_main_exe
(
main_wargv
[
0
],
curdir
,
&
image
,
&
module
,
&
image_info
);
status
=
load_main_exe
(
main_wargv
[
0
],
main_argv
[
0
],
curdir
,
&
image
,
&
module
,
&
image_info
);
if
(
!
status
&&
image_info
.
Machine
!=
current_machine
)
/* need to restart for Wow64 */
{
NtUnmapViewOfSection
(
GetCurrentProcess
(),
module
);
...
...
@@ -1888,7 +1888,7 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params(void)
free
(
image
);
prepend_main_wargv
(
args
,
3
);
if
((
status
=
load_main_exe
(
startW
,
curdir
,
&
image
,
&
module
,
&
image_info
)))
if
((
status
=
load_main_exe
(
startW
,
NULL
,
curdir
,
&
image
,
&
module
,
&
image_info
)))
{
MESSAGE
(
"wine: failed to start %s
\n
"
,
debugstr_w
(
main_wargv
[
2
])
);
NtTerminateProcess
(
GetCurrentProcess
(),
status
);
...
...
@@ -2042,7 +2042,7 @@ void init_startup_info(void)
free
(
info
);
NtCurrentTeb
()
->
Peb
->
ProcessParameters
=
params
;
status
=
load_main_exe
(
params
->
ImagePathName
.
Buffer
,
params
->
CommandLine
.
Buffer
,
status
=
load_main_exe
(
params
->
ImagePathName
.
Buffer
,
NULL
,
params
->
CommandLine
.
Buffer
,
&
image
,
&
module
,
&
image_info
);
if
(
status
)
{
...
...
dlls/ntdll/unix/loader.c
View file @
96710025
...
...
@@ -1500,8 +1500,8 @@ static NTSTATUS open_main_image( WCHAR *image, void **module, SECTION_IMAGE_INFO
/***********************************************************************
* load_main_exe
*/
NTSTATUS
load_main_exe
(
const
WCHAR
*
name
,
const
WCHAR
*
curdir
,
WCHAR
**
image
,
void
**
module
,
SECTION_IMAGE_INFORMATION
*
image_info
)
NTSTATUS
load_main_exe
(
const
WCHAR
*
name
,
const
char
*
unix_name
,
const
WCHAR
*
curdir
,
WCHAR
**
image
,
void
**
module
,
SECTION_IMAGE_INFORMATION
*
image_info
)
{
UNICODE_STRING
nt_name
;
NTSTATUS
status
;
...
...
@@ -1510,9 +1510,9 @@ NTSTATUS load_main_exe( const WCHAR *name, const WCHAR *curdir, WCHAR **image, v
const
WCHAR
*
p
;
/* special case for Unix file name */
if
(
main_argv
[
0
][
0
]
==
'/'
&&
!
stat
(
main_argv
[
0
]
,
&
st
))
if
(
unix_name
&&
unix_name
[
0
]
==
'/'
&&
!
stat
(
unix_name
,
&
st
))
{
if
((
status
=
unix_to_nt_file_name
(
main_argv
[
0
]
,
image
)))
goto
failed
;
if
((
status
=
unix_to_nt_file_name
(
unix_name
,
image
)))
goto
failed
;
status
=
open_main_image
(
*
image
,
module
,
image_info
);
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
return
status
;
free
(
*
image
);
...
...
dlls/ntdll/unix/unix_private.h
View file @
96710025
...
...
@@ -143,8 +143,8 @@ extern char **build_envp( const WCHAR *envW ) DECLSPEC_HIDDEN;
extern
NTSTATUS
exec_wineloader
(
char
**
argv
,
int
socketfd
,
const
pe_image_info_t
*
pe_info
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
load_builtin
(
const
pe_image_info_t
*
image_info
,
const
WCHAR
*
filename
,
void
**
addr_ptr
,
SIZE_T
*
size_ptr
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
load_main_exe
(
const
WCHAR
*
name
,
const
WCHAR
*
curdir
,
WCHAR
**
image
,
void
**
modul
e
,
SECTION_IMAGE_INFORMATION
*
image_info
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
load_main_exe
(
const
WCHAR
*
name
,
const
char
*
unix_name
,
const
WCHAR
*
curdir
,
WCHAR
**
imag
e
,
void
**
module
,
SECTION_IMAGE_INFORMATION
*
image_info
)
DECLSPEC_HIDDEN
;
extern
void
start_server
(
BOOL
debug
)
DECLSPEC_HIDDEN
;
extern
ULONG_PTR
get_image_address
(
void
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment