From d0a7c09304eca6fb99f7b298e8c3f28a198f9af8 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Tue, 14 Feb 2023 21:19:42 -0500 Subject: [PATCH] Don't use SYMLINK_NOFOLLOW in a statat call This is not supported on 2.6 kernels, and we really don't expect this directory to be a symlink --- src/process/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process/mod.rs b/src/process/mod.rs index 80b29e63..e6dd6fcb 100644 --- a/src/process/mod.rs +++ b/src/process/mod.rs @@ -1183,7 +1183,7 @@ impl Process { // Use fast path if available (Linux v6.2): https://github.com/torvalds/linux/commit/f1f1f2569901 let stat = wrap_io_error!( self.root.join("fd"), - rustix::fs::statat(&self.fd, "fd", AtFlags::SYMLINK_NOFOLLOW) + rustix::fs::statat(&self.fd, "fd", AtFlags::empty()) )?; if stat.st_size > 0 { return Ok(stat.st_size as usize);