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

Commit 9c4f39e9 authored by Jeff Vander Stoep's avatar Jeff Vander Stoep Committed by Jeffrey Vander Stoep
Browse files

Installd: restorecon mislabeled gsf

This is a temporary fix while we determine a better long term fix.
This will recursively fix up the selinux context of
/data/user/0/com.google.android.gsf.

Bug: 188141923
Bug: 190567190
Test: 1. adb root
2. adb shell cp /system/build.prop /user/data/0/com.google.android.gsf
3. adb reboot
4. adb root; adb shell ls -laZ /user/data/0/com.google.android.gsf
5. verify that installd has fixed up incorrect labels.

Change-Id: Ieadd64b61162f2fa802add2a8e54d2072ad2fd48
parent 57aa9a97
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -342,7 +342,8 @@ static int restorecon_app_data_lazy(const std::string& path, const std::string&

    // If the initial top-level restorecon above changed the label, then go
    // back and restorecon everything recursively
    if (strcmp(before, after)) {
    // TODO(b/190567190, b/188141923) Remove recursive fixup of com.google.android.gsf.
    if (strcmp(before, after) || (path.find("com.google.android.gsf") != std::string::npos)) {
        if (existing) {
            LOG(DEBUG) << "Detected label change from " << before << " to " << after << " at "
                    << path << "; running recursive restorecon";