Merge "Drop the O_NOFOLLOW flag." am: 0e41945e3a am: ee7d15d542
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1679497 Change-Id: Ie059d5363f2b1c0727aee64043a5149e2e679097
This commit is contained in:
@@ -848,9 +848,7 @@ public final class PinnerService extends SystemService {
|
|||||||
int mapSize = 0;
|
int mapSize = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
int openFlags = (OsConstants.O_RDONLY |
|
int openFlags = (OsConstants.O_RDONLY | OsConstants.O_CLOEXEC);
|
||||||
OsConstants.O_CLOEXEC |
|
|
||||||
OsConstants.O_NOFOLLOW);
|
|
||||||
fd = Os.open(fileToPin, openFlags, 0);
|
fd = Os.open(fileToPin, openFlags, 0);
|
||||||
mapSize = (int) Math.min(Os.fstat(fd).st_size, Integer.MAX_VALUE);
|
mapSize = (int) Math.min(Os.fstat(fd).st_size, Integer.MAX_VALUE);
|
||||||
address = Os.mmap(0, mapSize,
|
address = Os.mmap(0, mapSize,
|
||||||
|
|||||||
Reference in New Issue
Block a user