fs.mitm: Always mitm non-sysmodules.

This commit is contained in:
Michael Scire
2018-11-15 14:59:47 -08:00
parent 46cc08160d
commit e0c7bfc93d
4 changed files with 16 additions and 11 deletions

View File

@@ -106,7 +106,7 @@ Result FsMitmService::OpenBisStorage(Out<std::shared_ptr<IStorageInterface>> out
/* PRODINFO should *never* be writable. */
storage = std::make_shared<IStorageInterface>(new ROProxyStorage(bis_storage));
} else {
if (allow_writes) {
if (!allow_writes) {
storage = std::make_shared<IStorageInterface>(new ROProxyStorage(bis_storage));
} else {
/* Sysmodules should still be allowed to read and write. */
@@ -128,6 +128,10 @@ Result FsMitmService::OpenDataStorageByCurrentProcess(Out<std::shared_ptr<IStora
u32 out_domain_id = 0;
Result rc = 0;
if (!this->should_override_contents) {
return RESULT_FORWARD_TO_SESSION;
}
bool has_cache = StorageCacheGetEntry(this->title_id, &storage);
ON_SCOPE_EXIT {
@@ -191,6 +195,10 @@ Result FsMitmService::OpenDataStorageByDataId(Out<std::shared_ptr<IStorageInterf
FsStorageId storage_id = (FsStorageId)sid;
FsStorage data_storage;
FsFile data_file;
if (!this->should_override_contents) {
return RESULT_FORWARD_TO_SESSION;
}
std::shared_ptr<IStorageInterface> storage = nullptr;
u32 out_domain_id = 0;