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-credsto function. - Reads Signstar configuration from data and writes to default config location.
- Creates
/run/systemd/io.systemd.Credentialsby runningsystemd-socket-activatein the background
Returns the list of ExtendedUserMappings derived from the Signstar configuration and the
BackgroundProcess returned from start_credentials_socket.
ยงErrors
Returns an error if
write_machine_idfails,- a new
SignstarConfigcan not be created fromconfig_data, - a
SignstarConfigcan not be saved to a system-wide location, - or
start_credentials_socketfails.