From 14c880125900364ac689665ecd2a052108b18efa Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Fri, 8 Oct 2021 15:25:52 -0700 Subject: [PATCH] sm: remove apm:p compatibility hack Homebrew which would hang when doing this were compiled with libnx < 3.0.0. Homebrew which is compiled with < 3.0.0 cannot send messages to sm, because of the incorrect serialization problem (which required homebrew recompile when 12.0.0 released). Thus, there is no case where this makes a difference. --- stratosphere/sm/source/impl/sm_service_manager.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/stratosphere/sm/source/impl/sm_service_manager.cpp b/stratosphere/sm/source/impl/sm_service_manager.cpp index 5e088f8c5..50ad9b8ad 100644 --- a/stratosphere/sm/source/impl/sm_service_manager.cpp +++ b/stratosphere/sm/source/impl/sm_service_manager.cpp @@ -554,14 +554,6 @@ namespace ams::sm::impl { /* Validate service name. */ R_TRY(ValidateServiceName(service)); - /* In 8.0.0, Nintendo removed the service apm:p -- however, all homebrew attempts to get */ - /* a handle to this when calling appletInitialize(). Because hbl has access to all services, */ - /* This would return true, and homebrew would *wait forever* trying to get a handle to a service */ - /* that will never register. Thus, in the interest of not breaking every single piece of homebrew */ - /* we will provide a little first class help. */ - constexpr ServiceName ApmP = ServiceName::Encode("apm:p"); - R_UNLESS((hos::GetVersion() < hos::Version_8_0_0) || (service != ApmP), sm::ResultNotAllowed()); - /* Check that the process is registered and allowed to get the service. */ if (!IsInitialProcess(process_id)) { ProcessInfo *proc = GetProcessInfo(process_id); @@ -762,7 +754,6 @@ namespace ams::sm::impl { service_info->mitm_port_h = os::InvalidNativeHandle; service_info->mitm_query_h = os::InvalidNativeHandle; service_info->mitm_process_id = os::InvalidProcessId; - } return ResultSuccess();