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

Commit 93125768 authored by Oli Lan's avatar Oli Lan Committed by Gerrit Code Review
Browse files

Merge "Change ownership of apex data directories to root."

parents d363769d dc516720
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -60,6 +60,7 @@
#include <fscrypt/fscrypt.h>
#include <fscrypt/fscrypt.h>
#include <libgsi/libgsi.h>
#include <libgsi/libgsi.h>
#include <logwrap/logwrap.h>
#include <logwrap/logwrap.h>
#include <private/android_filesystem_config.h>
#include <selinux/android.h>
#include <selinux/android.h>
#include <selinux/label.h>
#include <selinux/label.h>
#include <selinux/selinux.h>
#include <selinux/selinux.h>
@@ -1266,9 +1267,7 @@ static Result<void> create_apex_data_dirs() {
        if (strchr(name, '@') != nullptr) continue;
        if (strchr(name, '@') != nullptr) continue;


        auto path = "/data/misc/apexdata/" + std::string(name);
        auto path = "/data/misc/apexdata/" + std::string(name);
        auto system_uid = DecodeUid("system");
        auto options = MkdirOptions{path, 0770, AID_ROOT, AID_SYSTEM, FscryptAction::kNone, "ref"};
        auto options =
                MkdirOptions{path, 0700, *system_uid, *system_uid, FscryptAction::kNone, "ref"};
        make_dir_with_options(options);
        make_dir_with_options(options);
    }
    }
    return {};
    return {};