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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user