Add sudo for nftables query command
All checks were successful
Build and Release / build-and-release (push) Successful in 1m26s
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:
parent
98ed17947d
commit
c65d596099
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard-agent"
|
||||
version = "0.1.247"
|
||||
version = "0.1.248"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard"
|
||||
version = "0.1.247"
|
||||
version = "0.1.248"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard-shared"
|
||||
version = "0.1.247"
|
||||
version = "0.1.248"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user