Add sudo for nftables query command
All checks were successful
Build and Release / build-and-release (push) Successful in 1m26s

Update nftables port collector to use sudo when querying ruleset.
Requires corresponding sudoers configuration in NixOS.

- Change nft command to use sudo
- Update version to v0.1.248
This commit is contained in:
Christoffer Martinsson 2025-12-04 13:40:31 +01:00
parent 98ed17947d
commit c65d596099
4 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard-agent"
version = "0.1.247"
version = "0.1.248"
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", "nft", "list", "ruleset"])
.args(&["3", "sudo", "nft", "list", "ruleset"])
.output();
let output = match output {

View File

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

View File

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