fs.mitm: also give choinx access to boot1 (closes #485)

This commit is contained in:
Michael Scire 2019-03-23 16:33:49 -07:00
parent 79244078a6
commit 047f3b653e

View file

@ -166,9 +166,10 @@ Result FsMitmService::OpenBisStorage(Out<std::shared_ptr<IStorageInterface>> out
if (is_sysmodule || has_bis_write_flag) { if (is_sysmodule || has_bis_write_flag) {
/* Sysmodules should still be allowed to read and write. */ /* Sysmodules should still be allowed to read and write. */
storage = std::make_shared<IStorageInterface>(new ProxyStorage(bis_storage)); storage = std::make_shared<IStorageInterface>(new ProxyStorage(bis_storage));
} else if (Utils::IsHblTid(this->title_id) && (BisStorageId_BcPkg2_1 <= bis_partition_id && bis_partition_id <= BisStorageId_BcPkg2_6)) { } else if (Utils::IsHblTid(this->title_id) &&
/* Allow HBL to write to package2. */ ((BisStorageId_BcPkg2_1 <= bis_partition_id && bis_partition_id <= BisStorageId_BcPkg2_6) || bis_partition_id == BisStorageId_Boot1)) {
/* This is needed to not break compatibility with ChoiDujourNX, which does not check error codes. */ /* Allow HBL to write to boot1 (safe firm) + package2. */
/* This is needed to not break compatibility with ChoiDujourNX, which does not check for write access before beginning an update. */
/* TODO: get fixed so that this can be turned off without causing bricks :/ */ /* TODO: get fixed so that this can be turned off without causing bricks :/ */
storage = std::make_shared<IStorageInterface>(new ProxyStorage(bis_storage)); storage = std::make_shared<IStorageInterface>(new ProxyStorage(bis_storage));
} else { } else {