MCPcopy Create free account
hub / github.com/bootc-dev/bootc / check_sysusers

Function check_sysusers

crates/lib/src/lints.rs:743–755  ·  view source on GitHub ↗
(rootfs: &Dir, config: &LintExecutionConfig)

Source from the content-addressed store, hash-verified

741 check_sysusers,
742);
743fn check_sysusers(rootfs: &Dir, config: &LintExecutionConfig) -> LintResult {
744 let r = bootc_sysusers::analyze(rootfs)?;
745 if r.is_empty() {
746 return lint_ok();
747 }
748 let mut msg = String::new();
749 let header = "Found /etc/passwd entry without corresponding systemd sysusers.d";
750 let items = r.missing_users.iter().map(|v| v as &dyn std::fmt::Display);
751 format_items(config, header, items, &mut msg)?;
752 let header = "Found /etc/group entry without corresponding systemd sysusers.d";
753 format_items(config, header, r.missing_groups.into_iter(), &mut msg)?;
754 lint_err(msg)
755}
756
757#[distributed_slice(LINTS)]
758static LINT_NONEMPTY_BOOT: Lint = Lint::new_warning(

Callers

nothing calls this directly

Calls 7

analyzeFunction · 0.85
lint_okFunction · 0.85
format_itemsFunction · 0.85
lint_errFunction · 0.85
is_emptyMethod · 0.45
iterMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected