Skip to content

Commit

Permalink
Don't use SYMLINK_NOFOLLOW in a statat call
Browse files Browse the repository at this point in the history
This is not supported on 2.6 kernels, and we really don't expect this
directory to be a symlink
  • Loading branch information
eminence committed Feb 15, 2023
1 parent bd3f514 commit d0a7c09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d0a7c09

Please sign in to comment.