You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/10/26 18:17:06 UTC
(opendal-yinyang) branch xuanwo/managed-directory-sync updated: fix: open untrusted files without blocking on fifos
This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch xuanwo/managed-directory-sync
in repository https://gitbox.apache.org/repos/asf/opendal-yinyang.git
The following commit(s) were added to refs/heads/xuanwo/managed-directory-sync by this push:
new 29d5335 fix: open untrusted files without blocking on fifos
29d5335 is described below
commit 29d5335935cb43066d3fd83c568de00d2abd9905
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Tue Oct 27 02:17:00 2026 +0800
fix: open untrusted files without blocking on fifos
Co-authored-by: Chojan Shang <ps...@apache.org>
---
src/replica/linux.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/replica/linux.rs b/src/replica/linux.rs
index f6accce..1515458 100644
--- a/src/replica/linux.rs
+++ b/src/replica/linux.rs
@@ -562,7 +562,7 @@ impl Replica {
let source = openat(
&parent_fd,
name,
- OFlags::RDONLY | OFlags::NOFOLLOW | OFlags::CLOEXEC,
+ OFlags::RDONLY | OFlags::NONBLOCK | OFlags::NOFOLLOW | OFlags::CLOEXEC,
Mode::empty(),
)
.map_err(|e| Error::errno("open upload source", &self.root.join(path), e))?;
@@ -2087,7 +2087,7 @@ fn hash_file_at(
let fd = openat(
parent,
name,
- OFlags::RDONLY | OFlags::NOFOLLOW | OFlags::CLOEXEC,
+ OFlags::RDONLY | OFlags::NONBLOCK | OFlags::NOFOLLOW | OFlags::CLOEXEC,
Mode::empty(),
)
.map_err(|e| Error::errno("open local file", path, e))?;