From: Volker Lendecke Date: Tue, 5 Sep 2023 12:53:18 +0000 (+0200) Subject: smbd: Simplify open_file() X-Git-Tag: tevent-0.16.0~227 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8645c7a1014a2d3f655c453ae833de3c83776b9;p=thirdparty%2Fsamba.git smbd: Simplify open_file() We handle O_TRUNC further down anyway by passing local_flags&~O_TRUNC to reopen_from_fsp(). No need for this FIFO special case. Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index ba1341de0d7..90cbf415093 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1398,7 +1398,6 @@ static NTSTATUS open_file(struct smb_request *req, */ if (file_existed && S_ISFIFO(smb_fname->st.st_ex_mode)) { - local_flags &= ~O_TRUNC; /* Can't truncate a FIFO. */ local_flags |= O_NONBLOCK; } #endif