summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2019-05-26 17:30:41 -0600
committerAlan Somers <asomers@gmail.com>2019-06-03 07:03:44 -0600
commit99c42bbfbae06b386c777e6151c631c9e414cd6f (patch)
tree734ca4868a6b1dac5d2b4a65ba8a67951b77cbe4
parent74515d91d02fdf541ec19015fae7bb08984a206e (diff)
downloadnix-99c42bbfbae06b386c777e6151c631c9e414cd6f.zip
Check euid, not uid, for socket tests
-rw-r--r--src/sys/socket/sockopt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs
index 4727698b..3360db75 100644
--- a/src/sys/socket/sockopt.rs
+++ b/src/sys/socket/sockopt.rs
@@ -684,7 +684,7 @@ mod test {
use ::unistd::Uid;
use ::std::io::{self, Write};
- if !Uid::current().is_root() {
+ if !Uid::effective().is_root() {
let stderr = io::stderr();
let mut handle = stderr.lock();
writeln!(handle, "SO_MARK requires root privileges. Skipping test.").unwrap();