The branch, v4-18-test has been updated
       via  14380eb832d vfs_aio_pthread: use SMB_VFS_NEXT_OPENAT() in 
aio_pthread_openat_fn()
      from  fd1111c2f48 s3: smbd: Sanitize any "server" and "share" components 
of SMB1 DFS paths to remove UNIX separators.

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-18-test


- Log -----------------------------------------------------------------
commit 14380eb832dff7f6c9e80206f2035bfb4a8e1a6b
Author: MikeLiu <mike...@qnap.com>
Date:   Tue Aug 22 10:01:14 2023 +0800

    vfs_aio_pthread: use SMB_VFS_NEXT_OPENAT() in aio_pthread_openat_fn()
    
    1. Set 'aio_allow_open' to false if fsp->fsp_flags.is_pathref
    2. Move !(how->flags & O_CREAT) and !(how->flags & O_EXCL) up and set 
'aio_allow_open' to false
    3. Use SMB_VFS_NEXT_OPENAT() instead of openat() for disable async opens 
case.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15453
    
    Signed-off-by: MikeLiu <mike...@qnap.com>
    Reviewed-by: Stefan Metzmacher <me...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Tue Aug 22 17:44:00 UTC 2023 on atb-devel-224
    
    Autobuild-User(v4-18-test): Jule Anger <jan...@samba.org>
    Autobuild-Date(v4-18-test): Mon Sep  4 09:49:30 UTC 2023 on atb-devel-224

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_aio_pthread.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_aio_pthread.c 
b/source3/modules/vfs_aio_pthread.c
index 0303ff04bc9..b099a6b5b52 100644
--- a/source3/modules/vfs_aio_pthread.c
+++ b/source3/modules/vfs_aio_pthread.c
@@ -483,28 +483,28 @@ static int aio_pthread_openat_fn(vfs_handle_struct 
*handle,
                aio_allow_open = false;
        }
 
-       if (!aio_allow_open) {
-               /* aio opens turned off. */
-               return openat(fsp_get_pathref_fd(dirfsp),
-                             smb_fname->base_name,
-                             how->flags,
-                             how->mode);
+       if (fsp->fsp_flags.is_pathref) {
+               /* Use SMB_VFS_NEXT_OPENAT() to call openat() with O_PATH. */
+               aio_allow_open = false;
        }
 
        if (!(how->flags & O_CREAT)) {
                /* Only creates matter. */
-               return openat(fsp_get_pathref_fd(dirfsp),
-                             smb_fname->base_name,
-                             how->flags,
-                             how->mode);
+               aio_allow_open = false;
        }
 
        if (!(how->flags & O_EXCL)) {
                /* Only creates with O_EXCL matter. */
-               return openat(fsp_get_pathref_fd(dirfsp),
-                             smb_fname->base_name,
-                             how->flags,
-                             how->mode);
+               aio_allow_open = false;
+       }
+
+       if (!aio_allow_open) {
+               /* aio opens turned off. */
+               return SMB_VFS_NEXT_OPENAT(handle,
+                             dirfsp,
+                             smb_fname,
+                             fsp,
+                             how);
        }
 
        /*


-- 
Samba Shared Repository

Reply via email to