From 2863526ec8a62d1c5ad4f9be0a18a8db54893aee Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 4 Dec 2025 16:10:25 +0100 Subject: [PATCH] Remove timeout wrapper from nft command Run sudo nft directly without timeout wrapper to preserve capabilities. The timeout -> sudo chain was preventing nft from accessing netlink with proper permissions. - Change from 'timeout 3 sudo nft' to 'sudo nft' - Allows CAP_NET_ADMIN to pass through correctly - Update version to v0.1.256 --- Cargo.lock | 6 +++--- agent/Cargo.toml | 2 +- agent/src/collectors/systemd.rs | 4 ++-- dashboard/Cargo.toml | 2 +- shared/Cargo.toml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9ba4875..d79211d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "cm-dashboard" -version = "0.1.254" +version = "0.1.255" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cm-dashboard-agent" -version = "0.1.254" +version = "0.1.255" dependencies = [ "anyhow", "async-trait", @@ -325,7 +325,7 @@ dependencies = [ [[package]] name = "cm-dashboard-shared" -version = "0.1.254" +version = "0.1.255" dependencies = [ "chrono", "serde", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index cc5bb6a..4ac329f 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-agent" -version = "0.1.255" +version = "0.1.256" edition = "2021" [dependencies] diff --git a/agent/src/collectors/systemd.rs b/agent/src/collectors/systemd.rs index 872011e..a34b573 100644 --- a/agent/src/collectors/systemd.rs +++ b/agent/src/collectors/systemd.rs @@ -914,8 +914,8 @@ impl SystemdCollector { /// Get nftables open ports grouped by protocol /// Returns: (tcp_ports_string, udp_ports_string) fn get_nftables_open_ports(&self) -> (String, String) { - let output = Command::new("timeout") - .args(&["3", "sudo", "/run/current-system/sw/bin/nft", "list", "ruleset"]) + let output = Command::new("sudo") + .args(&["/run/current-system/sw/bin/nft", "list", "ruleset"]) .output(); let output = match output { diff --git a/dashboard/Cargo.toml b/dashboard/Cargo.toml index b37ab85..14b5353 100644 --- a/dashboard/Cargo.toml +++ b/dashboard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard" -version = "0.1.255" +version = "0.1.256" edition = "2021" [dependencies] diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 94792a4..b61329f 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-shared" -version = "0.1.255" +version = "0.1.256" edition = "2021" [dependencies]