summaryrefslogtreecommitdiff
path: root/test/test.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2019-05-26 17:47:49 -0600
committerAlan Somers <asomers@gmail.com>2019-06-06 08:51:54 -0600
commit913f8f4748a902842e84f23e00adcddeead4a7a9 (patch)
tree95ed8048da4c86a30500737458a5ff46514fb5bf /test/test.rs
parent99c42bbfbae06b386c777e6151c631c9e414cd6f (diff)
downloadnix-913f8f4748a902842e84f23e00adcddeead4a7a9.zip
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.
Diffstat (limited to 'test/test.rs')
-rw-r--r--test/test.rs2
1 files changed, 2 insertions, 0 deletions
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]