1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-05 19:51:45 +00:00

fs.mitm: just intercept literally everything

This commit is contained in:
Michael Scire 2018-11-15 15:46:05 -08:00
parent ff09efb1bf
commit 2b4e6bf25d
2 changed files with 8 additions and 8 deletions

View file

@ -78,7 +78,7 @@ void __appExit(void) {
struct FsMitmManagerOptions {
static const size_t PointerBufferSize = 0x800;
static const size_t MaxDomains = 0x10;
static const size_t MaxDomains = 0x40;
static const size_t MaxDomainObjects = 0x4000;
};
using FsMitmManager = WaitableManager<FsMitmManagerOptions>;

View file

@ -33,16 +33,16 @@ class FsMitmService : public IMitmServiceObject {
bool should_override_contents;
public:
FsMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
this->should_override_contents = !Utils::HasSdDisableMitMFlag(this->title_id) && Utils::HasOverrideButton(this->title_id);
if (Utils::HasSdDisableMitMFlag(this->title_id)) {
this->should_override_contents = false;
} else {
this->should_override_contents = (this->title_id >= 0x0100000000010000ULL || Utils::HasSdMitMFlag(this->title_id)) && Utils::HasOverrideButton(this->title_id);
}
}
static bool ShouldMitm(u64 pid, u64 tid) {
/* Always intercept NS, so that we can protect the boot partition. */
if (tid == 0x010000000000001FULL) {
return true;
}
return (tid >= 0x0100000000010000ULL || Utils::HasSdMitMFlag(tid));
/* fs.mitm should always mitm everything. */
return true;
}
static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx);