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

Commit 928d2c1a authored by Alan Stokes's avatar Alan Stokes
Browse files

Run restorecon on new profile directories.

We want them to end up labeled user_profile_data_file, but without the
restorecon they will inherit user_profile_root_file from the parent
directory.

Bug: 141677108
Bug: 175311045
Test: Manual; install & uninstall app, label correct, no denials
Change-Id: I588c450bcc1c1b26f89708f95982ba23609ae4ea
parent 24756e39
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -398,6 +398,10 @@ static bool prepare_app_profile_dir(const std::string& packageName, int32_t appI
        PLOG(ERROR) << "Failed to prepare " << profile_dir;
        return false;
    }
    if (selinux_android_restorecon(profile_dir.c_str(), 0)) {
        PLOG(ERROR) << "Failed to restorecon " << profile_dir;
        return false;
    }

    const std::string ref_profile_path =
            create_primary_reference_profile_package_dir_path(packageName);