Remove timeout wrapper from nft command
All checks were successful
Build and Release / build-and-release (push) Successful in 1m21s
All checks were successful
Build and Release / build-and-release (push) Successful in 1m21s
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
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard-agent"
|
||||
version = "0.1.255"
|
||||
version = "0.1.256"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user