smbd: leave comment on broken SMB1 POSIX open handling of SMB_O_DIRECT
authorRalph Boehme <slow@samba.org>
Fri, 24 Nov 2023 15:29:57 +0000 (16:29 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 27 Nov 2023 18:31:35 +0000 (18:31 +0000)
Since e0814dc5082dd4ecca8a155e0ce24b073158fd92 the passed in attributes get
replaced by the mode in create_file_default().

As FILE_FLAG_NO_BUFFERING is never checked when doing the final IO, it doesn't
really matter.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb1_trans2.c

index 77a5d36164984ddb9c9621bcd41d5f980591c40f..b2a6cf88b24bb30541faabc4ea4099429011cec0 100644 (file)
@@ -3461,6 +3461,12 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
                access_mask |= FILE_APPEND_DATA;
        }
        if (wire_open_mode & SMB_O_DIRECT) {
+               /*
+                * BUG: this doesn't work anymore since
+                * e0814dc5082dd4ecca8a155e0ce24b073158fd92. But since
+                * FILE_FLAG_NO_BUFFERING isn't used at all in the IO codepath,
+                * it doesn't really matter.
+                */
                attributes |= FILE_FLAG_NO_BUFFERING;
        }