[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Sat Sep 8 05:06:02 MDT 2012
The branch, master has been updated
via f5a6b7b s3:smbd: don't set kernel flock if "kernel share modes = no"
via da07186 s3: add an option "kernel share modes" to be able to switch off using kernel flocks
via f2f47b4 loadparm: remove remnants of removed option "share modes"
from 3fef8e2 selftest/Samba3: don't explicitly set 'server max protocol'
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f5a6b7b301d1bc345cbfdc349e483ac5318e6a78
Author: Michael Adam <obnox at samba.org>
Date: Sat Sep 8 10:52:28 2012 +0200
s3:smbd: don't set kernel flock if "kernel share modes = no"
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Sat Sep 8 13:05:05 CEST 2012 on sn-devel-104
commit da071869628c8b6ea6ed01b4f1083680114505a9
Author: Michael Adam <obnox at samba.org>
Date: Sat Sep 8 10:47:51 2012 +0200
s3: add an option "kernel share modes" to be able to switch off using kernel flocks
Signed-off-by: Stefan Metzmacher <metze at samba.org>
commit f2f47b4bae8761d12a878957afac6397565aaf2c
Author: Michael Adam <obnox at samba.org>
Date: Sat Sep 8 10:43:19 2012 +0200
loadparm: remove remnants of removed option "share modes"
(This completes commit d0878b3b8179b1cf061e1058bacbe670363b51c6)
Signed-off-by: Stefan Metzmacher <metze at samba.org>
-----------------------------------------------------------------------
Summary of changes:
lib/param/param_functions.c | 2 +-
lib/param/param_table.c | 9 +++++++++
source3/include/proto.h | 1 +
source3/param/loadparm.c | 4 +---
source3/smbd/open.c | 2 +-
5 files changed, 13 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/param/param_functions.c b/lib/param/param_functions.c
index 4ff44f0..3b39e88 100644
--- a/lib/param/param_functions.c
+++ b/lib/param/param_functions.c
@@ -102,9 +102,9 @@ FN_LOCAL_BOOL(dmapi_support, bDmapiSupport)
FN_LOCAL_PARM_BOOL(locking, bLocking)
FN_LOCAL_PARM_INTEGER(strict_locking, iStrictLocking)
FN_LOCAL_PARM_BOOL(posix_locking, bPosixLocking)
-FN_LOCAL_BOOL(share_modes, bShareModes)
FN_LOCAL_BOOL(kernel_oplocks, bKernelOplocks)
FN_LOCAL_BOOL(level2_oplocks, bLevel2OpLocks)
+FN_LOCAL_BOOL(kernel_share_modes, bKernelShareModes)
FN_LOCAL_BOOL(onlyuser, bOnlyUser)
FN_LOCAL_PARM_BOOL(manglednames, bMangledNames)
FN_LOCAL_BOOL(symlinks, bSymlinks)
diff --git a/lib/param/param_table.c b/lib/param/param_table.c
index 2aa392a..23489ae 100644
--- a/lib/param/param_table.c
+++ b/lib/param/param_table.c
@@ -3001,6 +3001,15 @@ static struct parm_struct parm_table[] = {
.flags = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
},
{
+ .label = "kernel share modes",
+ .type = P_BOOL,
+ .p_class = P_LOCAL,
+ .offset = LOCAL_VAR(bKernelShareModes),
+ .special = NULL,
+ .enum_list = NULL,
+ .flags = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
+ },
+ {
.label = "locking",
.type = P_BOOL,
.p_class = P_LOCAL,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3635759..44b9d71 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1291,6 +1291,7 @@ bool lp_posix_locking(const struct share_params *p );
bool lp_oplocks(int );
bool lp_kernel_oplocks(int );
bool lp_level2_oplocks(int );
+bool lp_kernel_share_modes(int);
bool lp_onlyuser(int );
bool lp_manglednames(const struct share_params *p );
bool lp_allow_insecure_widelinks(void);
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 5f00932..563d644 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -232,7 +232,6 @@ static struct loadparm_service sDefault =
.bLocking = true,
.iStrictLocking = Auto,
.bPosixLocking = true,
- .bShareModes = true,
.bOpLocks = true,
.bKernelOplocks = false,
.bLevel2OpLocks = true,
@@ -282,6 +281,7 @@ static struct loadparm_service sDefault =
.iDirectoryNameCacheSize = 100,
#endif
.ismb_encrypt = SMB_SIGNING_DEFAULT,
+ .bKernelShareModes = true,
.param_opt = NULL,
.dummy = ""
};
@@ -1804,8 +1804,6 @@ bool lp_add_printer(const char *pszPrintername, int iDefaultService)
/* Printers cannot be read_only. */
ServicePtrs[i]->bRead_only = false;
- /* No share modes on printer services. */
- ServicePtrs[i]->bShareModes = false;
/* No oplocks on printer services. */
ServicePtrs[i]->bOpLocks = false;
/* Printer services must be printable. */
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index e919b13..bf2a672 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 ){
--
Samba Shared Repository
More information about the samba-cvs
mailing list