The Samba-Bugzilla – Attachment 12105 Details for
Bug 11919
SMB_VFS_KERNEL_FLOCK should only be called when 'kernel share modes = yes'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for master that has been sent to samba-technical
bug-11919.master.patch (text/plain), 1.73 KB, created by
Michael Adam
on 2016-05-15 21:49:14 UTC
(
hide
)
Description:
patch for master that has been sent to samba-technical
Filename:
MIME Type:
Creator:
Michael Adam
Created:
2016-05-15 21:49:14 UTC
Size:
1.73 KB
patch
obsolete
>From 0b2d3ffcdb5aba067e74348df3772b56d689474c Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Sun, 15 May 2016 23:24:08 +0200 >Subject: [PATCH] smbd:close: only call VFS_KERNEL_FLOCK of 'kernel share modes > = yes' > >This avoids errors due to 'not implemented' on some file systems >like glusterfs (with the vfs module). The only other code path >wher SMB_VFS_KERNEL_FLOCK is called, is already protected. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11919 > >Signed-off-by: Michael Adam <obnox@samba.org> >--- > source3/smbd/close.c | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > >diff --git a/source3/smbd/close.c b/source3/smbd/close.c >index 0302c67..2333683 100644 >--- a/source3/smbd/close.c >+++ b/source3/smbd/close.c >@@ -250,7 +250,6 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, > const struct security_token *del_nt_token = NULL; > bool got_tokens = false; > bool normal_close; >- int ret_flock; > > /* Ensure any pending write time updates are done. */ > if (fsp->update_write_time_event) { >@@ -474,12 +473,16 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, > pop_sec_ctx(); > } > >- /* remove filesystem sharemodes */ >- ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, 0, 0); >- if (ret_flock == -1) { >- DEBUG(2, ("close_remove_share_mode: removing kernel flock for " >- "%s failed: %s\n", fsp_str_dbg(fsp), >- strerror(errno))); >+ if (lp_kernel_share_modes(SNUM(conn))) { >+ int ret_flock; >+ >+ /* remove filesystem sharemodes */ >+ ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, 0, 0); >+ if (ret_flock == -1) { >+ DEBUG(2, ("close_remove_share_mode: removing kernel " >+ "flock for %s failed: %s\n", >+ fsp_str_dbg(fsp), strerror(errno))); >+ } > } > > if (!del_share_mode(lck, fsp)) { >-- >2.5.5 >
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:
obnox
:
review-
Actions:
View
Attachments on
bug 11919
: 12105 |
12120