Loading fs_mgr/fs_mgr.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -2215,11 +2215,11 @@ bool fs_mgr_mount_overlayfs_fstab_entry(const FstabEntry& entry) { #if ALLOW_ADBD_DISABLE_VERITY == 0 // Allowlist the mount point if user build. static const std::vector<const std::string> kAllowedPaths = { static const std::vector<std::string> kAllowedPaths = { "/odm", "/odm_dlkm", "/oem", "/product", "/system_dlkm", "/system_ext", "/vendor", "/vendor_dlkm", }; static const std::vector<const std::string> kAllowedPrefixes = { static const std::vector<std::string> kAllowedPrefixes = { "/mnt/product/", "/mnt/vendor/", }; Loading mkbootfs/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ package { cc_binary_host { name: "mkbootfs", srcs: ["mkbootfs.c"], srcs: ["mkbootfs.cpp"], cflags: ["-Werror"], static_libs: [ "libbase", Loading mkbootfs/mkbootfs.c→mkbootfs/mkbootfs.cpp +8 −10 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ static void fix_stat(const char *path, struct stat *s) } } static void _eject(struct stat *s, char *out, int olen, char *data, unsigned datasize) static void _eject(struct stat *s, const char *out, int olen, char *data, unsigned datasize) { // Nothing is special about this value, just picked something in the // approximate range that was being used already, and avoiding small Loading Loading @@ -151,9 +151,10 @@ static void _archive_dir(char *in, char *out, int ilen, int olen) DIR* d = opendir(in); if (d == NULL) err(1, "cannot open directory '%s'", in); // TODO: switch to std::vector int size = 32; int entries = 0; char** names = malloc(size * sizeof(char*)); char** names = (char**) malloc(size * sizeof(char*)); if (names == NULL) { errx(1, "failed to allocate dir names array (size %d)", size); } Loading @@ -167,7 +168,7 @@ static void _archive_dir(char *in, char *out, int ilen, int olen) if (entries >= size) { size *= 2; names = realloc(names, size * sizeof(char*)); names = (char**) realloc(names, size * sizeof(char*)); if (names == NULL) { errx(1, "failed to reallocate dir names array (size %d)", size); } Loading Loading @@ -447,13 +448,10 @@ int main(int argc, char *argv[]) while (num_dirs-- > 0){ char *x = strchr(*argv, '='); if(x != 0) { *x++ = 0; } else { x = ""; if (x != nullptr) { *x++ = '\0'; } archive(*argv, x); archive(*argv, x ?: ""); argv++; } Loading rootdir/init.rc +3 −3 Original line number Diff line number Diff line Loading @@ -70,6 +70,9 @@ on early-init start ueventd # Mount tracefs (with GID=AID_READTRACEFS) mount tracefs tracefs /sys/kernel/tracing gid=3012 # Run apexd-bootstrap so that APEXes that provide critical libraries # become available. Note that this is executed as exec_start to ensure that # the libraries are available to the processes started after this statement. Loading @@ -80,9 +83,6 @@ on early-init mkdir /dev/boringssl 0755 root root mkdir /dev/boringssl/selftest 0755 root root # Mount tracefs (with GID=AID_READTRACEFS) mount tracefs tracefs /sys/kernel/tracing gid=3012 # create sys dirctory mkdir /dev/sys 0755 system system mkdir /dev/sys/fs 0755 system system Loading Loading
fs_mgr/fs_mgr.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -2215,11 +2215,11 @@ bool fs_mgr_mount_overlayfs_fstab_entry(const FstabEntry& entry) { #if ALLOW_ADBD_DISABLE_VERITY == 0 // Allowlist the mount point if user build. static const std::vector<const std::string> kAllowedPaths = { static const std::vector<std::string> kAllowedPaths = { "/odm", "/odm_dlkm", "/oem", "/product", "/system_dlkm", "/system_ext", "/vendor", "/vendor_dlkm", }; static const std::vector<const std::string> kAllowedPrefixes = { static const std::vector<std::string> kAllowedPrefixes = { "/mnt/product/", "/mnt/vendor/", }; Loading
mkbootfs/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ package { cc_binary_host { name: "mkbootfs", srcs: ["mkbootfs.c"], srcs: ["mkbootfs.cpp"], cflags: ["-Werror"], static_libs: [ "libbase", Loading
mkbootfs/mkbootfs.c→mkbootfs/mkbootfs.cpp +8 −10 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ static void fix_stat(const char *path, struct stat *s) } } static void _eject(struct stat *s, char *out, int olen, char *data, unsigned datasize) static void _eject(struct stat *s, const char *out, int olen, char *data, unsigned datasize) { // Nothing is special about this value, just picked something in the // approximate range that was being used already, and avoiding small Loading Loading @@ -151,9 +151,10 @@ static void _archive_dir(char *in, char *out, int ilen, int olen) DIR* d = opendir(in); if (d == NULL) err(1, "cannot open directory '%s'", in); // TODO: switch to std::vector int size = 32; int entries = 0; char** names = malloc(size * sizeof(char*)); char** names = (char**) malloc(size * sizeof(char*)); if (names == NULL) { errx(1, "failed to allocate dir names array (size %d)", size); } Loading @@ -167,7 +168,7 @@ static void _archive_dir(char *in, char *out, int ilen, int olen) if (entries >= size) { size *= 2; names = realloc(names, size * sizeof(char*)); names = (char**) realloc(names, size * sizeof(char*)); if (names == NULL) { errx(1, "failed to reallocate dir names array (size %d)", size); } Loading Loading @@ -447,13 +448,10 @@ int main(int argc, char *argv[]) while (num_dirs-- > 0){ char *x = strchr(*argv, '='); if(x != 0) { *x++ = 0; } else { x = ""; if (x != nullptr) { *x++ = '\0'; } archive(*argv, x); archive(*argv, x ?: ""); argv++; } Loading
rootdir/init.rc +3 −3 Original line number Diff line number Diff line Loading @@ -70,6 +70,9 @@ on early-init start ueventd # Mount tracefs (with GID=AID_READTRACEFS) mount tracefs tracefs /sys/kernel/tracing gid=3012 # Run apexd-bootstrap so that APEXes that provide critical libraries # become available. Note that this is executed as exec_start to ensure that # the libraries are available to the processes started after this statement. Loading @@ -80,9 +83,6 @@ on early-init mkdir /dev/boringssl 0755 root root mkdir /dev/boringssl/selftest 0755 root root # Mount tracefs (with GID=AID_READTRACEFS) mount tracefs tracefs /sys/kernel/tracing gid=3012 # create sys dirctory mkdir /dev/sys 0755 system system mkdir /dev/sys/fs 0755 system system Loading