The Samba-Bugzilla – Attachment 16646 Details for
Bug 14734
inherit owner not working on created directories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.14.next.
bug-14734-4.14.patchset (text/plain), 2.84 KB, created by
Jeremy Allison
on 2021-06-09 22:53:13 UTC
(
hide
)
Description:
git-am fix for 4.14.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2021-06-09 22:53:13 UTC
Size:
2.84 KB
patch
obsolete
>From 1b2d0bb562be106219dc3c370f33d607b91b3a36 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Wed, 9 Jun 2021 15:46:21 -0700 >Subject: [PATCH 1/2] s3: VFS: default: Add proc_fd's fallback for > vfswrap_fchmod(). > >https://bugzilla.samba.org/show_bug.cgi?id=14734 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/modules/vfs_default.c | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c >index 8d592bbad64..0db833c12dd 100644 >--- a/source3/modules/vfs_default.c >+++ b/source3/modules/vfs_default.c >@@ -2437,7 +2437,31 @@ static int vfswrap_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t m > > START_PROFILE(syscall_fchmod); > #if defined(HAVE_FCHMOD) >- result = fchmod(fsp_get_io_fd(fsp), mode); >+ if (!fsp->fsp_flags.is_pathref) { >+ result = fchmod(fsp_get_io_fd(fsp), mode); >+ END_PROFILE(syscall_fchmod); >+ return result; >+ } >+ >+ if (fsp->fsp_flags.have_proc_fds) { >+ int fd = fsp_get_pathref_fd(fsp); >+ const char *p = NULL; >+ char buf[PATH_MAX]; >+ >+ p = sys_proc_fd_path(fd, buf, sizeof(buf)); >+ if (p != NULL) { >+ result = chmod(p, mode); >+ } else { >+ result = -1; >+ } >+ END_PROFILE(syscall_fchmod); >+ return result; >+ } >+ >+ /* >+ * This is no longer a handle based call. >+ */ >+ result = chmod(fsp->fsp_name->base_name, mode); > #else > result = -1; > errno = ENOSYS; >-- >2.27.0 > > >From bfa0771cd65d9d65127d19a79098f8711f947081 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Wed, 9 Jun 2021 15:51:05 -0700 >Subject: [PATCH 2/2] s3: VFS: default: Add proc_fd's fallback for > vfswrap_fchown(). > >https://bugzilla.samba.org/show_bug.cgi?id=14734 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/modules/vfs_default.c | 27 ++++++++++++++++++++++++++- > 1 file changed, 26 insertions(+), 1 deletion(-) > >diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c >index 0db833c12dd..28d0414ac69 100644 >--- a/source3/modules/vfs_default.c >+++ b/source3/modules/vfs_default.c >@@ -2477,7 +2477,32 @@ static int vfswrap_fchown(vfs_handle_struct *handle, files_struct *fsp, uid_t ui > int result; > > START_PROFILE(syscall_fchown); >- result = fchown(fsp_get_io_fd(fsp), uid, gid); >+ >+ if (!fsp->fsp_flags.is_pathref) { >+ result = fchown(fsp_get_io_fd(fsp), uid, gid); >+ END_PROFILE(syscall_fchown); >+ return result; >+ } >+ >+ if (fsp->fsp_flags.have_proc_fds) { >+ int fd = fsp_get_pathref_fd(fsp); >+ const char *p = NULL; >+ char buf[PATH_MAX]; >+ >+ p = sys_proc_fd_path(fd, buf, sizeof(buf)); >+ if (p != NULL) { >+ result = chown(p, uid, gid); >+ } else { >+ result = -1; >+ } >+ END_PROFILE(syscall_fchown); >+ return result; >+ } >+ >+ /* >+ * This is no longer a handle based call. >+ */ >+ result = chown(fsp->fsp_name->base_name, uid, gid); > END_PROFILE(syscall_fchown); > return result; > #else >-- >2.27.0 >
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:
bjacke
:
review+
Actions:
View
Attachments on
bug 14734
:
16646
|
16652