From 6120ca99f25cd959b359381a3982808a1ceec8ab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 2 Sep 2021 14:40:53 -0700 Subject: [PATCH] s3: smbd: Fix openat_pathref_fsp() to cope with FIFO's in the filesystem. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14816 Signed-off-by: Jeremy Allison --- source3/smbd/files.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 413706fee0c..a2269d8da65 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -503,6 +503,10 @@ NTSTATUS openat_pathref_fsp(const struct files_struct *dirfsp, } } + if (S_ISFIFO(smb_fname->st.st_ex_mode)) { + open_flags |= O_NONBLOCK; + } + status = fd_openat(dirfsp, smb_fname, fsp, open_flags, 0); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND) || -- 2.30.2