The Samba-Bugzilla – Attachment 18067 Details for
Bug 15453
File doesn't show when user doesn't have permission if aio_pthread is loaded
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.19.next, 4.18.next. 4.17.next
bug-15453-4.19,4.18,4.17.patch (text/plain), 2.12 KB, created by
Jeremy Allison
on 2023-08-24 17:03:27 UTC
(
hide
)
Description:
git-am fix for 4.19.next, 4.18.next. 4.17.next
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2023-08-24 17:03:27 UTC
Size:
2.12 KB
patch
obsolete
>From 81226b5179e6ba806a0a690806ca2f9004f7c9f9 Mon Sep 17 00:00:00 2001 >From: MikeLiu <mikeliu@qnap.com> >Date: Tue, 22 Aug 2023 10:01:14 +0800 >Subject: [PATCH] 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 <mikeliu@qnap.com> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Tue Aug 22 17:44:00 UTC 2023 on atb-devel-224 >--- > source3/modules/vfs_aio_pthread.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > >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); > } > > /* >-- >2.39.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 15453
: 18067