Fix nftables query by using full path to nft binary
All checks were successful
Build and Release / build-and-release (push) Successful in 1m31s

Use explicit path /run/current-system/sw/bin/nft to match sudoers
configuration. Previously using 'nft' without path was resolving to
wrong location and failing permission checks.

- Change from 'sudo nft' to 'sudo /run/current-system/sw/bin/nft'
- Matches sudoers entry for passwordless execution
- Update version to v0.1.255
This commit is contained in:
Christoffer Martinsson 2025-12-04 16:02:14 +01:00
parent a7755f02ae
commit 5da9213da6
5 changed files with 7 additions and 7 deletions

6
Cargo.lock generated
View File

@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
[[package]]
name = "cm-dashboard"
version = "0.1.253"
version = "0.1.254"
dependencies = [
"anyhow",
"chrono",
@ -301,7 +301,7 @@ dependencies = [
[[package]]
name = "cm-dashboard-agent"
version = "0.1.253"
version = "0.1.254"
dependencies = [
"anyhow",
"async-trait",
@ -325,7 +325,7 @@ dependencies = [
[[package]]
name = "cm-dashboard-shared"
version = "0.1.253"
version = "0.1.254"
dependencies = [
"chrono",
"serde",

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard-agent"
version = "0.1.254"
version = "0.1.255"
edition = "2021"
[dependencies]

View File

@ -915,7 +915,7 @@ impl SystemdCollector {
/// Returns: (tcp_ports_string, udp_ports_string)
fn get_nftables_open_ports(&self) -> (String, String) {
let output = Command::new("timeout")
.args(&["3", "sudo", "nft", "list", "ruleset"])
.args(&["3", "sudo", "/run/current-system/sw/bin/nft", "list", "ruleset"])
.output();
let output = match output {

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard"
version = "0.1.254"
version = "0.1.255"
edition = "2021"
[dependencies]

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard-shared"
version = "0.1.254"
version = "0.1.255"
edition = "2021"
[dependencies]