summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2021-04-20 09:04:29 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2021-04-20 09:04:29 +0100
commit202b58f1194a94a478eeb2d98669616035237492 (patch)
tree9e96ebfc2a16a2c9ed9a7dd772986a37bf861104
parent1b06ec2530df3fac09dea019976377b7f9060653 (diff)
Drop the O_NOFOLLOW flag.
It's unclear why it was put in the first pinner implementation, and we may now get symbolic links returned by ART's metadata files. Test: boot and see that there's no pinner warning Bug: 185833667 Change-Id: I6cb1a5a9f684c7f0e61bb7fca394030d5dd30c58
-rw-r--r--services/core/java/com/android/server/PinnerService.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/PinnerService.java b/services/core/java/com/android/server/PinnerService.java
index 1241b77798ff..53af88e68468 100644
--- a/services/core/java/com/android/server/PinnerService.java
+++ b/services/core/java/com/android/server/PinnerService.java
@@ -848,9 +848,7 @@ public final class PinnerService extends SystemService {
int mapSize = 0;
try {
- int openFlags = (OsConstants.O_RDONLY |
- OsConstants.O_CLOEXEC |
- OsConstants.O_NOFOLLOW);
+ int openFlags = (OsConstants.O_RDONLY | OsConstants.O_CLOEXEC);
fd = Os.open(fileToPin, openFlags, 0);
mapSize = (int) Math.min(Os.fstat(fd).st_size, Integer.MAX_VALUE);
address = Os.mmap(0, mapSize,