[−][src]Crate sunrise_sm
Service Manager
Services are system processes running in the background which wait for incoming requests. When a process wants to communicate with a service, it first needs to get a handle to the named service, and then it can communicate with the service via inter-process communication (each service has a name up to 7 characters followed by a \0).
Handles for services are retrieved from the service manager port, "sm:", and are released via svcCloseHandle or when a process is terminated or crashes.
Manager service "sm:m" allows the Process Manager to tell sm: about the permissions of each process. By default, SM assumes a process has no permissions, and as such cannot access any service. "sm:m" RegisterProcess calls allows PM to tell the Service Manager about which services a certain process is allowed to access or host.
A Service is very similar to a kernel-managed Named Port: You can connect to it, and it returns a ClientSession. The difference is that a Service handled by "sm:" has an additional permission check done to ensure it isn't accessed by an unprivileged process. Service Manager
Structs
SERVICES | Global mapping of Service Name -> ClientPort. |
SERVICES_EVENT | Event signaled whenever a new service is registered. |
ServiceName | Helper type that makes a ServiceName displayable. |
UserInterface |
|
Statics
CAPABILITIES | |
HEADER |
Functions
get_service_length | Get the length of a service encoded as an u64. |
get_service_str | Casts an &u64 into an &str. |
main |