1 .\" Copyright (c) 2002, Apple Computer, Inc. All rights reserved.
8 .Nd Mach service naming (bootstrap) daemon
14 .Op Fl r Ar name-in-existing-server
17 is a daemon that maintains various mappings between service names and
18 the Mach ports that provide access to those services. Clients of mach_init
19 can register and lookup services, create new mapping subsets, and
20 associate services with declared servers. The mach_init daemon will
21 also be responsible for launching (and/or re-launching) those service
22 providing servers when attempts to use one or more of the associated services
25 The options are as follows:
32 starts in normal (non-debug) mode. Logging is minimal (only security-related
33 and process launch failures are logged). Core dumps are disabled for launched
34 servers. This is the default.
40 starts in debug mode. Logging is extensive. Core dumps will be taken for any
41 launched servers that crash.
47 forks during initialization so that it doesn't have to be put in
48 the background manually by the caller.
54 to register itself in a previously running copy of
56 under the service name
57 .Ar name-in-existing-server.
58 This is most useful when debugging new instances of
60 itself, but can also be used for robustness or to allow the subsequent
62 processes to run as a non-root user. As mach_init is often used to
63 launch servers, this could be more secure. However,
65 will not allow a server declaration to specify a user id different
66 than that of the requesting client (unless the client is running as root).
67 So it shouldn't be required for a secure configuration.
72 is provided through the bootstrap series of RPC APIs
73 over service ports published by mach_init itself. Each Mach task has
74 an assigned bootstrap port retrieved via task_get_bootstrap_port().
75 These bootstrap port registrations are inherited across fork().
77 The service registrations are grouped into subsets, providing a level
78 of security. Only processes with access to the subset's bootstrap port
79 will be able to register/lookup Mach ports within that subset. Lookups
80 from within a subset will search the subset first, then move on to its
81 parent, and then its grand-parent, etc... until a string name match is
82 found or the top of the bootstrap tree is reached. Subsets are sometimes
83 associated with login sessions to protect session-specific ports from being
84 exposed outside the session.
88 is responsible for launching the traditional BSD process control initialization
92 mach_init -d -r com.company.bootstrap
95 will start in debug mode, and register itself in an already running
98 under the service name com.company.bootstrap.
101 Sending a SIGHUP to a running mach_init will toggle debug mode.