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
2ad864dc
Commit
2ad864dc
authored
Feb 11, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't request PROT_EXEC permissions when mapping an image file to
avoid problems on noexec filesystems with kernel 2.6.
parent
487b9f5f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
virtual.c
dlls/ntdll/virtual.c
+3
-4
No files found.
dlls/ntdll/virtual.c
View file @
2ad864dc
...
...
@@ -660,7 +660,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, DWORD total_size
sec
->
PointerToRawData
,
pos
,
sec
->
SizeOfRawData
,
size
,
sec
->
Characteristics
);
if
(
VIRTUAL_mmap
(
shared_fd
,
ptr
+
sec
->
VirtualAddress
,
size
,
pos
,
0
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
pos
,
0
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
|
MAP_FIXED
,
NULL
)
==
(
void
*
)
-
1
)
{
ERR_
(
module
)(
"Could not map shared section %.8s
\n
"
,
sec
->
Name
);
...
...
@@ -676,8 +676,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, DWORD total_size
if
(
end
>
sec
->
VirtualAddress
+
size
)
end
=
sec
->
VirtualAddress
+
size
;
if
(
end
>
base
)
VIRTUAL_mmap
(
shared_fd
,
ptr
+
base
,
end
-
base
,
pos
+
(
base
-
sec
->
VirtualAddress
),
0
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
MAP_PRIVATE
|
MAP_FIXED
,
NULL
);
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
|
MAP_FIXED
,
NULL
);
}
pos
+=
size
;
continue
;
...
...
@@ -696,7 +695,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, DWORD total_size
* fall back to read(), so we don't need to check anything here.
*/
if
(
VIRTUAL_mmap
(
fd
,
ptr
+
sec
->
VirtualAddress
,
sec
->
SizeOfRawData
,
sec
->
PointerToRawData
,
0
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
sec
->
PointerToRawData
,
0
,
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
|
MAP_FIXED
,
&
removable
)
==
(
void
*
)
-
1
)
{
ERR_
(
module
)(
"Could not map section %.8s, file probably truncated
\n
"
,
sec
->
Name
);
...
...
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