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

Unverified Commit ebc617e9 authored by danielml's avatar danielml Committed by basamaryan
Browse files

recovery: Mount block map path before checking whether it is canonical



[    4.747659] recovery: Failed to get canonical of /cache/recovery/block.map, No such file or directory
[    4.759769] recovery: Block map path @/cache/recovery/block.map not canonical, abort installation.

Change-Id: I70ee25fcb419b3802d836bc206e3154b6cff7ea3
Signed-off-by: default avatardanielml <daniel@danielml.es>
parent 063b583d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -829,13 +829,13 @@ bool SetupPackageMount(const std::string& package_path, bool* should_use_fuse) {
  *should_use_fuse = true;
  if (package_path[0] == '@') {
    auto block_map_path = package_path.substr(1);
    if (!CheckPathCanonical(block_map_path)) {
      LOG(ERROR) << "Block map path " << package_path << " not canonical, abort installation.";
    if (ensure_path_mounted(block_map_path) != 0) {
      LOG(ERROR) << "Failed to mount " << block_map_path;
      return false;
    }

    if (ensure_path_mounted(block_map_path) != 0) {
      LOG(ERROR) << "Failed to mount " << block_map_path;
    if (!CheckPathCanonical(block_map_path)) {
      LOG(ERROR) << "Block map path " << package_path << " not canonical, abort installation.";
      return false;
    }
    // uncrypt only produces block map only if the package stays on /data.