smbd: Simplify open_file()
authorVolker Lendecke <vl@samba.org>
Tue, 5 Sep 2023 12:53:18 +0000 (14:53 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 5 Oct 2023 12:58:33 +0000 (12:58 +0000)
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 <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/open.c

index ba1341de0d788c20fad4e72bf7f8a6f3fd3bd73d..90cbf4150932754ea0b94502761f50a4e089ac2a 100644 (file)
@@ -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