Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d80eb97b
Commit
d80eb97b
authored
Sep 15, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 15, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use FILE_SHARE_DELETE when loading modules, as running an exe that's
going to be deleted should work.
parent
8087fca3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
process.c
dlls/kernel/process.c
+3
-3
loader.c
dlls/ntdll/loader.c
+2
-2
No files found.
dlls/kernel/process.c
View file @
d80eb97b
...
...
@@ -195,7 +195,7 @@ static HANDLE open_exe_file( const WCHAR *name )
TRACE
(
"looking for %s
\n
"
,
debugstr_w
(
name
)
);
if
((
handle
=
CreateFileW
(
name
,
GENERIC_READ
,
FILE_SHARE_READ
,
if
((
handle
=
CreateFileW
(
name
,
GENERIC_READ
,
FILE_SHARE_READ
|
FILE_SHARE_DELETE
,
NULL
,
OPEN_EXISTING
,
0
,
0
))
==
INVALID_HANDLE_VALUE
)
{
/* file doesn't exist, check for builtin */
...
...
@@ -260,7 +260,7 @@ static BOOL find_exe_file( const WCHAR *name, WCHAR *buffer, int buflen, HANDLE
if
(
SearchPathW
(
NULL
,
name
,
NULL
,
buflen
,
buffer
,
NULL
))
{
TRACE
(
"Trying native/Unix binary %s
\n
"
,
debugstr_w
(
buffer
)
);
if
((
*
handle
=
CreateFileW
(
buffer
,
GENERIC_READ
,
FILE_SHARE_READ
,
if
((
*
handle
=
CreateFileW
(
buffer
,
GENERIC_READ
,
FILE_SHARE_READ
|
FILE_SHARE_DELETE
,
NULL
,
OPEN_EXISTING
,
0
,
0
))
!=
INVALID_HANDLE_VALUE
)
return
TRUE
;
}
...
...
@@ -276,7 +276,7 @@ static BOOL find_exe_file( const WCHAR *name, WCHAR *buffer, int buflen, HANDLE
{
case
LOADORDER_DLL
:
TRACE
(
"Trying native exe %s
\n
"
,
debugstr_w
(
buffer
)
);
if
((
*
handle
=
CreateFileW
(
buffer
,
GENERIC_READ
,
FILE_SHARE_READ
,
if
((
*
handle
=
CreateFileW
(
buffer
,
GENERIC_READ
,
FILE_SHARE_READ
|
FILE_SHARE_DELETE
,
NULL
,
OPEN_EXISTING
,
0
,
0
))
!=
INVALID_HANDLE_VALUE
)
return
TRUE
;
if
(
GetLastError
()
!=
ERROR_FILE_NOT_FOUND
)
return
TRUE
;
...
...
dlls/ntdll/loader.c
View file @
d80eb97b
...
...
@@ -1398,7 +1398,7 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname,
attr
.
ObjectName
=
&
nt_name
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
if
(
NtOpenFile
(
handle
,
GENERIC_READ
,
&
attr
,
&
io
,
FILE_SHARE_READ
,
0
))
*
handle
=
0
;
if
(
NtOpenFile
(
handle
,
GENERIC_READ
,
&
attr
,
&
io
,
FILE_SHARE_READ
|
FILE_SHARE_DELETE
,
0
))
*
handle
=
0
;
RtlFreeUnicodeString
(
&
nt_name
);
return
STATUS_SUCCESS
;
}
...
...
@@ -1445,7 +1445,7 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname,
attr
.
ObjectName
=
&
nt_name
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
if
(
NtOpenFile
(
handle
,
GENERIC_READ
,
&
attr
,
&
io
,
FILE_SHARE_READ
,
0
))
*
handle
=
0
;
if
(
NtOpenFile
(
handle
,
GENERIC_READ
,
&
attr
,
&
io
,
FILE_SHARE_READ
|
FILE_SHARE_DELETE
,
0
))
*
handle
=
0
;
}
RtlFreeUnicodeString
(
&
nt_name
);
return
STATUS_SUCCESS
;
...
...
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