From 913f8f4748a902842e84f23e00adcddeead4a7a9 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 26 May 2019 17:47:49 -0600 Subject: Fix the is_so_mark_functional test in Linux containers It's not sufficient to check for root privileges. In a container, the euid may be root even though the user lacks some capabilities. Replace this test's root check with a check for the CAP_NET_ADMIN capability instead. --- test/test.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/test.rs') diff --git a/test/test.rs b/test/test.rs index a91b6348..c7b9c013 100644 --- a/test/test.rs +++ b/test/test.rs @@ -1,4 +1,6 @@ extern crate bytes; +#[cfg(target_os = "linux")] +extern crate caps; #[macro_use] extern crate cfg_if; #[macro_use] -- cgit v1.2.3