Loading init/builtins.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -915,9 +915,13 @@ static int do_restorecon_recursive(const std::vector<std::string>& args) { int ret = 0; int ret = 0; for (auto it = std::next(args.begin()); it != args.end(); ++it) { for (auto it = std::next(args.begin()); it != args.end(); ++it) { if (restorecon_recursive(it->c_str()) < 0) /* The contents of CE paths are encrypted on FBE devices until user * credentials are presented (filenames inside are mangled), so we need * to delay restorecon of those until vold explicitly requests it. */ if (restorecon_recursive_skipce(it->c_str()) < 0) { ret = -errno; ret = -errno; } } } return ret; return ret; } } Loading init/util.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -379,6 +379,12 @@ int restorecon_recursive(const char* pathname) return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE); return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE); } } int restorecon_recursive_skipce(const char* pathname) { return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE | SELINUX_ANDROID_RESTORECON_SKIPCE); } /* /* * Writes hex_len hex characters (1/2 byte) to hex from bytes. * Writes hex_len hex characters (1/2 byte) to hex from bytes. */ */ Loading init/util.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -70,6 +70,7 @@ void import_kernel_cmdline(bool in_qemu, int make_dir(const char *path, mode_t mode); int make_dir(const char *path, mode_t mode); int restorecon(const char *pathname); int restorecon(const char *pathname); int restorecon_recursive(const char *pathname); int restorecon_recursive(const char *pathname); int restorecon_recursive_skipce(const char *pathname); std::string bytes_to_hex(const uint8_t *bytes, size_t bytes_len); std::string bytes_to_hex(const uint8_t *bytes, size_t bytes_len); bool is_dir(const char* pathname); bool is_dir(const char* pathname); bool expand_props(const std::string& src, std::string* dst); bool expand_props(const std::string& src, std::string* dst); Loading Loading
init/builtins.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -915,9 +915,13 @@ static int do_restorecon_recursive(const std::vector<std::string>& args) { int ret = 0; int ret = 0; for (auto it = std::next(args.begin()); it != args.end(); ++it) { for (auto it = std::next(args.begin()); it != args.end(); ++it) { if (restorecon_recursive(it->c_str()) < 0) /* The contents of CE paths are encrypted on FBE devices until user * credentials are presented (filenames inside are mangled), so we need * to delay restorecon of those until vold explicitly requests it. */ if (restorecon_recursive_skipce(it->c_str()) < 0) { ret = -errno; ret = -errno; } } } return ret; return ret; } } Loading
init/util.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -379,6 +379,12 @@ int restorecon_recursive(const char* pathname) return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE); return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE); } } int restorecon_recursive_skipce(const char* pathname) { return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE | SELINUX_ANDROID_RESTORECON_SKIPCE); } /* /* * Writes hex_len hex characters (1/2 byte) to hex from bytes. * Writes hex_len hex characters (1/2 byte) to hex from bytes. */ */ Loading
init/util.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -70,6 +70,7 @@ void import_kernel_cmdline(bool in_qemu, int make_dir(const char *path, mode_t mode); int make_dir(const char *path, mode_t mode); int restorecon(const char *pathname); int restorecon(const char *pathname); int restorecon_recursive(const char *pathname); int restorecon_recursive(const char *pathname); int restorecon_recursive_skipce(const char *pathname); std::string bytes_to_hex(const uint8_t *bytes, size_t bytes_len); std::string bytes_to_hex(const uint8_t *bytes, size_t bytes_len); bool is_dir(const char* pathname); bool is_dir(const char* pathname); bool expand_props(const std::string& src, std::string* dst); bool expand_props(const std::string& src, std::string* dst); Loading