bis_protect: guard against autorcm on rcm-patched units
This commit is contained in:
@@ -41,6 +41,11 @@ void fuse_init(void)
|
||||
fuse_secondary_private_key_disable();
|
||||
fuse_disable_programming();
|
||||
|
||||
/* TODO: Should we allow this to be done later? */
|
||||
if (!g_has_checked_for_rcm_bug_patch) {
|
||||
(void)(fuse_has_rcm_bug_patch());
|
||||
}
|
||||
|
||||
/* TODO: Overrides (iROM patches) and various reads happen here */
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,16 @@ static HosMutex g_boot0_mutex;
|
||||
static u8 g_boot0_bct_buffer[Boot0Storage::BctEndOffset];
|
||||
|
||||
bool Boot0Storage::CanModifyBctPubks() {
|
||||
return this->title_id != TitleId_Ns;
|
||||
if (IsRcmBugPatched()) {
|
||||
/* RCM bug patched. */
|
||||
/* Only allow NS to update the BCT pubks. */
|
||||
/* AutoRCM on a patched unit will cause a brick, so homebrew should NOT be allowed to write. */
|
||||
return this->title_id == TitleId_Ns;
|
||||
} else {
|
||||
/* RCM bug unpatched. */
|
||||
/* Allow homebrew but not NS to update the BCT pubks. */
|
||||
return this->title_id != TitleId_Ns;
|
||||
}
|
||||
}
|
||||
|
||||
Result Boot0Storage::Read(void *_buffer, size_t size, u64 offset) {
|
||||
|
||||
Submodule stratosphere/libstratosphere updated: 37b74c7d75...b6ca2d89ae
Reference in New Issue
Block a user