The Samba-Bugzilla – Attachment 7659 Details for
Bug 8974
Kernel oplocks are broken when uid(file) != uid(process)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated fix for master.
0001-Fix-bug-8974-Kernel-oplocks-are-broken-when-uid-file.patch (text/plain), 1.75 KB, created by
Jeremy Allison
on 2012-06-18 21:52:00 UTC
(
hide
)
Description:
Updated fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2012-06-18 21:52:00 UTC
Size:
1.75 KB
patch
obsolete
>From ff12654c91a75b64531c0df82cc75bac4efd4831 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Mon, 18 Jun 2012 14:51:01 -0700 >Subject: [PATCH] Fix bug #8974 - Kernel oplocks are broken when uid(file) != > uid(process). > >Based on a fix from "Etienne Dechamps " <e-t172@akegroup.org> >--- > source3/modules/vfs_default.c | 5 ----- > source3/smbd/oplock_linux.c | 12 ++++++++++++ > 2 files changed, 12 insertions(+), 5 deletions(-) > >diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c >index b387cce..eb3e343 100644 >--- a/source3/modules/vfs_default.c >+++ b/source3/modules/vfs_default.c >@@ -1573,11 +1573,6 @@ static int vfswrap_linux_setlease(vfs_handle_struct *handle, files_struct *fsp, > START_PROFILE(syscall_linux_setlease); > > #ifdef HAVE_KERNEL_OPLOCKS_LINUX >- /* first set the signal handler */ >- if(linux_set_lease_sighandler(fsp->fh->fd) == -1) { >- return -1; >- } >- > result = linux_setlease(fsp->fh->fd, leasetype); > #else > errno = ENOSYS; >diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c >index 190578e..623a2a6 100644 >--- a/source3/smbd/oplock_linux.c >+++ b/source3/smbd/oplock_linux.c >@@ -76,9 +76,21 @@ int linux_setlease(int fd, int leasetype) > { > int ret; > >+ /* first set the signal handler */ >+ if(linux_set_lease_sighandler(fd) == -1) { >+ return -1; >+ } > ret = fcntl(fd, F_SETLEASE, leasetype); > if (ret == -1 && errno == EACCES) { > set_effective_capability(LEASE_CAPABILITY); >+ /* Bug 8974 - work around Linux kernel bug >+ https://bugzilla.kernel.org/show_bug.cgi?id=43336. >+ "fcntl(F_SETLEASE) resets signal number when >+ called multiple times" >+ */ >+ if(linux_set_lease_sighandler(fd) == -1) { >+ return -1; >+ } > ret = fcntl(fd, F_SETLEASE, leasetype); > } > >-- >1.7.9.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
Actions:
View
Attachments on
bug 8974
:
7622
|
7652
|
7659
|
7664