pub fn prepare_system_with_config(
config_data: &[u8],
) -> Result<(Vec<ExtendedUserMapping>, BackgroundProcess), Error>
Expand description
Prepares a system for use with Signstar.
Prepares the following:
- Creates
/etc/machine-id
, which is needed forsystemd-creds
to function. - Reads Signstar configuration from data and writes to default config location.
- Creates
/run/systemd/io.systemd.Credentials
by runningsystemd-socket-activate
in the background
Returns the list of ExtendedUserMapping
s derived from the Signstar configuration and the
BackgroundProcess
returned from start_credentials_socket
.
ยงErrors
Returns an error if
write_machine_id
fails,- a new
HermeticParallelConfig
can not be created fromconfig_data
, - a
HermeticParallelConfig
can not be saved to a system-wide location, - or
start_credentials_socket
fails.