Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 142 additions & 99 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/interfire-daemon/src/audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ mod tests {
assert_eq!(rows.len(), 2);
assert_eq!(rows[0].message, "b");
assert_eq!(rows[1].message, "c");
assert!(log.tail(0).is_empty());
assert_eq!(log.tail(0).len(), 0);
let _ = fs::remove_file(path);
}

Expand Down
2 changes: 1 addition & 1 deletion crates/interfire-daemon/src/nft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ table inet interfire {
rules_active: false,
queue_bound: false,
});
assert!(open.is_empty());
assert_eq!(open, "");
let user_out_with_queue = compose_traffic_script(&TrafficCompose {
machine: crate::traffic_mode::TrafficPreference::Open,
users: &[(42, crate::traffic_mode::TrafficPreference::Out)],
Expand Down
2 changes: 1 addition & 1 deletion crates/interfire-daemon/src/observe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ mod tests {
let summary = shared.stats.lock().expect("stats").summary(0);
assert_eq!(summary.connections, 1);
assert_eq!(summary.denied, 1);
assert!(shared.stats.lock().expect("stats").hosts().is_empty());
assert_eq!(shared.stats.lock().expect("stats").hosts().len(), 0);
let _ = fs::remove_file(audit_path);
}

Expand Down
3 changes: 1 addition & 2 deletions crates/interfire-daemon/src/operator_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,16 @@ fn prepare_operator_socket_with(socket: &Path, lookup: GroupLookup) -> io::Resul
chown(socket, None, Some(gid))?;
fs::set_permissions(socket, fs::Permissions::from_mode(0o660))?;
info!(group = OPERATOR_GROUP, "IPC socket open to operator group");
Ok(())
}
GroupLookup::Missing => {
fs::set_permissions(socket, fs::Permissions::from_mode(0o600))?;
warn!(
group = OPERATOR_GROUP,
"operator group missing; socket remains owner-only"
);
Ok(())
}
}
Ok(())
}

/// True when `uid` may mutate policy (root, daemon UID, or operator group).
Expand Down
6 changes: 3 additions & 3 deletions crates/interfire-daemon/src/recent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ mod tests {
recent.record(1, 1, dest(443));
recent.record(2, 2, dest(80));
recent.record(3, 3, dest(22));
assert!(recent.for_process(1, 1).is_empty());
assert_eq!(recent.for_process(1, 1).len(), 0);
assert_eq!(recent.for_process(3, 3).len(), 1);
}

#[test]
fn unknown_process_returns_empty() {
let recent = RecentConnects::new(2, 2);
assert!(recent.for_process(99, 1).is_empty());
assert_eq!(recent.for_process(99, 1).len(), 0);
}

#[test]
Expand All @@ -141,7 +141,7 @@ mod tests {
verdict: "allow".into(),
},
);
assert!(recent.for_process(1, 1).is_empty());
assert_eq!(recent.for_process(1, 1).len(), 0);
assert_eq!(recent.for_process(2, 2).len(), 1);
}
}
2 changes: 1 addition & 1 deletion crates/interfire-daemon/src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ mod tests {
store.record_unattributed_deny();
assert_eq!(store.summary(0).connections, 1);
assert_eq!(store.summary(0).denied, 1);
assert!(store.hosts().is_empty());
assert_eq!(store.hosts().len(), 0);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/interfire-ebpf/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ mod tests {

#[test]
fn embedded_bytecode_is_non_empty() {
assert!(!embedded_bytecode().is_empty());
assert_ne!(embedded_bytecode(), []);
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions crates/interfire-rules/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ mod tests {
rules.insert(rule(1, Verdict::Allow)).unwrap();
assert!(rules.remove(1));
assert!(!rules.remove(1));
assert!(rules.rules().is_empty());
assert_eq!(rules.rules(), []);
}

#[test]
Expand All @@ -361,7 +361,7 @@ mod tests {
));
let _ = std::fs::remove_file(&path);
let store = RulesStore::new(&path);
assert!(store.load().unwrap().rules().is_empty());
assert_eq!(store.load().unwrap().rules(), []);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/interfire-tui/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@ mod tests {
app.handle_key(KeyCode::Char('t'));
assert_eq!(app.handle_key(KeyCode::Char('z')), KeyAction::None);
app.tab = Tab::Help;
assert!(app.visible_list(5).items.is_empty());
assert_eq!(app.visible_list(5).items, [] as [std::string::String; 0]);
}

#[test]
Expand Down
1 change: 0 additions & 1 deletion ui/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ fn paint_chrome(theme: &mut Theme, c: &PhoenixColors) {
theme.title_bar_border = c.border;
theme.status_bar = c.surface;
theme.status_bar_border = c.border;
theme.tiles = c.surface;
theme.progress_bar = c.accent;
theme.slider_bar = c.accent;
theme.slider_thumb = c.on_accent;
Expand Down
Loading