diff --git a/stratosphere/fs_mitm/source/fsmitm_service.cpp b/stratosphere/fs_mitm/source/fsmitm_service.cpp index b8384d26c..ebb485c88 100644 --- a/stratosphere/fs_mitm/source/fsmitm_service.cpp +++ b/stratosphere/fs_mitm/source/fsmitm_service.cpp @@ -106,7 +106,7 @@ Result FsMitmService::OpenBisStorage(Out> out /* PRODINFO should *never* be writable. */ storage = std::make_shared(new ROProxyStorage(bis_storage)); } else { - if (allow_writes) { + if (!allow_writes) { storage = std::make_shared(new ROProxyStorage(bis_storage)); } else { /* Sysmodules should still be allowed to read and write. */ @@ -128,6 +128,10 @@ Result FsMitmService::OpenDataStorageByCurrentProcess(Outshould_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(Outshould_override_contents) { + return RESULT_FORWARD_TO_SESSION; + } std::shared_ptr storage = nullptr; u32 out_domain_id = 0; diff --git a/stratosphere/fs_mitm/source/fsmitm_service.hpp b/stratosphere/fs_mitm/source/fsmitm_service.hpp index 33516ccba..3d4c6e3f1 100644 --- a/stratosphere/fs_mitm/source/fsmitm_service.hpp +++ b/stratosphere/fs_mitm/source/fsmitm_service.hpp @@ -30,9 +30,10 @@ enum FspSrvCmd : u32 { class FsMitmService : public IMitmServiceObject { private: bool has_initialized = false; + bool should_override_contents; public: - FsMitmService(std::shared_ptr s) : IMitmServiceObject(s) { - /* ... */ + FsMitmService(std::shared_ptr s, u64 pid) : IMitmServiceObject(s, pid) { + this->should_override_contents = !Utils::HasSdDisableMitMFlag(this->title_id) && Utils::HasOverrideButton(this->title_id); } static bool ShouldMitm(u64 pid, u64 tid) { @@ -40,12 +41,8 @@ class FsMitmService : public IMitmServiceObject { if (tid == 0x010000000000001FULL) { return true; } - - if (Utils::HasSdDisableMitMFlag(tid)) { - return false; - } - - return (tid >= 0x0100000000010000ULL || Utils::HasSdMitMFlag(tid)) && Utils::HasOverrideButton(tid); + + return (tid >= 0x0100000000010000ULL || Utils::HasSdMitMFlag(tid)); } static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx); diff --git a/stratosphere/libstratosphere b/stratosphere/libstratosphere index 8fcac73ab..0bec72ca3 160000 --- a/stratosphere/libstratosphere +++ b/stratosphere/libstratosphere @@ -1 +1 @@ -Subproject commit 8fcac73ab2b91afe184abe48c887ea1cb9bf2076 +Subproject commit 0bec72ca36084e9780a8c28abd4a0b24c03c18af diff --git a/stratosphere/set_mitm/source/setsys_mitm_service.hpp b/stratosphere/set_mitm/source/setsys_mitm_service.hpp index 2e3da205f..65a172175 100644 --- a/stratosphere/set_mitm/source/setsys_mitm_service.hpp +++ b/stratosphere/set_mitm/source/setsys_mitm_service.hpp @@ -25,7 +25,7 @@ enum SetSysCmd : u32 { class SetSysMitmService : public IMitmServiceObject { public: - SetSysMitmService(std::shared_ptr s) : IMitmServiceObject(s) { + SetSysMitmService(std::shared_ptr s, u64 pid) : IMitmServiceObject(s, pid) { /* ... */ }