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

Commit 202b58f1 authored by Nicolas Geoffray's avatar Nicolas Geoffray
Browse files

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
parent 1b06ec25
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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,