summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-09-08 10:52:28 +0200
committerStefan Metzmacher <metze@samba.org>2012-09-08 13:05:05 +0200
commitf5a6b7b301d1bc345cbfdc349e483ac5318e6a78 (patch)
treec59a746f513a31bfbb629ab3128cad7c58f38046 /source3
parentda071869628c8b6ea6ed01b4f1083680114505a9 (diff)
downloadsamba-f5a6b7b301d1bc345cbfdc349e483ac5318e6a78.tar.gz
samba-f5a6b7b301d1bc345cbfdc349e483ac5318e6a78.tar.bz2
samba-f5a6b7b301d1bc345cbfdc349e483ac5318e6a78.zip
s3:smbd: don't set kernel flock if "kernel share modes = no"
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Sep 8 13:05:05 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index e919b1392e..bf2a6729bf 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2577,7 +2577,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
the kernel refuses the operations then the kernel is wrong.
note that GPFS supports it as well - jmcd */
- if (fsp->fh->fd != -1) {
+ if (fsp->fh->fd != -1 && lp_kernel_share_modes(SNUM(conn))) {
int ret_flock;
ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, share_access, access_mask);
if(ret_flock == -1 ){