mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-24 03:06:17 +00:00
fs.mitm: just intercept literally everything
This commit is contained in:
parent
ff09efb1bf
commit
2b4e6bf25d
2 changed files with 8 additions and 8 deletions
|
@ -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>;
|
||||
|
|
|
@ -33,18 +33,18 @@ 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) {
|
||||
/* fs.mitm should always mitm everything. */
|
||||
return true;
|
||||
}
|
||||
|
||||
return (tid >= 0x0100000000010000ULL || Utils::HasSdMitMFlag(tid));
|
||||
}
|
||||
|
||||
static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx);
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue