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

Commit 7488d59c authored by Jared Fuchs's avatar Jared Fuchs
Browse files

Add /vendor/odm/overlay to framework RRO allowlist

Framework RROs were allowed in vendor or odm partition.  However, they
were not allowed the odm subdirectory of the vendor partition which is
used by devices without a separate odm partition.  This difference was
not intended so add the /vendor/odm/overlay path to the allowed list.

Change-Id: I55b618320ed5b9f599173d4377189d0b67b1e836
Flag: EXEMPT Bugfix
Bug: 432463913
Test: install odm RRO on device without odm partition, see it enabled
parent e43f2984
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ bool FileDescriptorAllowlist::IsAllowed(const std::string& path) const {
    // See AssetManager.cpp for more details on overlay-subdir.
    static const char* kOverlayDir = "/system/vendor/overlay/";
    static const char* kVendorOverlayDir = "/vendor/overlay";
    static const char* kVendorOdmOverlayDir = "/vendor/odm/overlay";
    static const char* kVendorOverlaySubdir = "/system/vendor/overlay-subdir/";
    static const char* kSystemProductOverlayDir = "/system/product/overlay/";
    static const char* kProductOverlayDir = "/product/overlay";
@@ -129,6 +130,7 @@ bool FileDescriptorAllowlist::IsAllowed(const std::string& path) const {

    if ((android::base::StartsWith(path, kOverlayDir) ||
         android::base::StartsWith(path, kVendorOverlaySubdir) ||
         android::base::StartsWith(path, kVendorOdmOverlayDir) ||
         android::base::StartsWith(path, kVendorOverlayDir) ||
         android::base::StartsWith(path, kSystemProductOverlayDir) ||
         android::base::StartsWith(path, kProductOverlayDir) ||