Function prepare_system_with_config

Source
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 for systemd-creds to function.
  • Reads Signstar configuration from data and writes to default config location.
  • Creates /run/systemd/io.systemd.Credentials by running systemd-socket-activate in 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