Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bc439fa authored by Nicolas Geoffray's avatar Nicolas Geoffray Committed by Automerger Merge Worker
Browse files

Merge "Drop the O_NOFOLLOW flag." am: 0e41945e am: ee7d15d5 am: 7c53c538

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1679497

Change-Id: I8531bc7fd375d1a58c672dcba8d37eada4b4da40
parents 780d7188 7c53c538
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -935,9 +935,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,