From f5a6b7b301d1bc345cbfdc349e483ac5318e6a78 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 8 Sep 2012 10:52:28 +0200 Subject: s3:smbd: don't set kernel flock if "kernel share modes = no" Signed-off-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Sat Sep 8 13:05:05 CEST 2012 on sn-devel-104 --- source3/smbd/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ){ -- cgit