mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-05 09:02:15 +02:00
sm: add permissive unregistration compile-time option
This commit is contained in:
parent
34c16e211f
commit
f38b610732
@ -41,7 +41,7 @@ ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE
|
||||
CFLAGS := -g -Wall -O2 -ffunction-sections \
|
||||
$(ARCH) $(DEFINES)
|
||||
|
||||
CFLAGS += $(INCLUDE) -D__SWITCH__ -DSM_ENABLE_MITM -DSM_ENABLE_INIT_DEFERS -DSM_MINIMUM_SESSION_LIMIT=8
|
||||
CFLAGS += $(INCLUDE) -D__SWITCH__ -DSM_ENABLE_MITM -DSM_ENABLE_INIT_DEFERS -DSM_MINIMUM_SESSION_LIMIT=8 -DSM_ENABLE_PERMISSIVE_UNREGISTER
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17
|
||||
|
||||
|
@ -428,9 +428,11 @@ Result Registration::UnregisterServiceForPid(u64 pid, u64 service) {
|
||||
return 0xE15;
|
||||
}
|
||||
|
||||
#ifndef SM_ENABLE_PERMISSIVE_UNREGISTER
|
||||
if (!IsInitialProcess(pid) && target_service->owner_pid != pid) {
|
||||
return 0x1015;
|
||||
}
|
||||
#endif
|
||||
|
||||
svcCloseHandle(target_service->port_h);
|
||||
svcCloseHandle(target_service->mitm_port_h);
|
||||
|
Loading…
Reference in New Issue
Block a user