summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/cluster/ctdb/opendb_ctdb.c2
-rw-r--r--source4/ntvfs/common/opendb_tdb.c3
-rw-r--r--source4/param/loadparm.c6
-rw-r--r--source4/param/share.h2
4 files changed, 9 insertions, 4 deletions
diff --git a/source4/cluster/ctdb/opendb_ctdb.c b/source4/cluster/ctdb/opendb_ctdb.c
index 402f3a2a1a..f0366ceb49 100644
--- a/source4/cluster/ctdb/opendb_ctdb.c
+++ b/source4/cluster/ctdb/opendb_ctdb.c
@@ -97,7 +97,7 @@ static struct odb_context *odb_ctdb_init(TALLOC_CTX *mem_ctx,
odb->ntvfs_ctx = ntvfs_ctx;
/* leave oplocks disabled by default until the code is working */
- odb->oplocks = lp_parm_bool(ntvfs_ctx->lp_ctx, NULL, "opendb", "oplocks", false);
+ odb->oplocks = share_bool_option(ntvfs->ctx->config, SHARE_OPLOCKS, SHARE_OPLOCKS_DEFAULT);
return odb;
}
diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c
index fc05b342a8..40a1d27f30 100644
--- a/source4/ntvfs/common/opendb_tdb.c
+++ b/source4/ntvfs/common/opendb_tdb.c
@@ -101,8 +101,7 @@ static struct odb_context *odb_tdb_init(TALLOC_CTX *mem_ctx,
odb->ntvfs_ctx = ntvfs_ctx;
- /* leave oplocks disabled by default until the code is working */
- odb->oplocks = lp_parm_bool(ntvfs_ctx->lp_ctx, NULL, "opendb", "oplocks", true);
+ odb->oplocks = share_bool_option(ntvfs_ctx->ctx->config, SHARE_OPLOCKS, SHARE_OPLOCKS_DEFAULT);
odb->lease_ctx = sys_lease_context_create(ntvfs_ctx->config, odb,
ntvfs_ctx->event_ctx,
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index a1d29b0771..9e0a239abe 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -210,6 +210,7 @@ struct loadparm_service
int bMap_hidden;
int bMap_archive;
int bStrictLocking;
+ int bOplocks;
int iCreate_mask;
int iCreate_force_mode;
int iDir_mask;
@@ -715,6 +716,7 @@ _PUBLIC_ FN_LOCAL_BOOL(lp_print_ok, bPrint_ok)
_PUBLIC_ FN_LOCAL_BOOL(lp_map_hidden, bMap_hidden)
_PUBLIC_ FN_LOCAL_BOOL(lp_map_archive, bMap_archive)
_PUBLIC_ FN_LOCAL_BOOL(lp_strict_locking, bStrictLocking)
+_PUBLIC_ FN_LOCAL_BOOL(lp_oplocks, bOplocks)
_PUBLIC_ FN_LOCAL_BOOL(lp_strict_sync, bStrictSync)
_PUBLIC_ FN_LOCAL_BOOL(lp_ci_filesystem, bCIFileSystem)
_PUBLIC_ FN_LOCAL_BOOL(lp_map_system, bMap_system)
@@ -2292,7 +2294,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lp_do_global_parameter(lp_ctx, "max connections", "-1");
lp_do_global_parameter(lp_ctx, "dcerpc endpoint servers", "epmapper srvsvc wkssvc rpcecho samr netlogon lsarpc spoolss drsuapi winreg dssetup unixinfo");
- lp_do_global_parameter(lp_ctx, "server services", "smb rpc nbt wrepl ldap cldap web kdc drepl winbind");
+ lp_do_global_parameter(lp_ctx, "server services", "smb rpc nbt wrepl ldap cldap kdc drepl winbind");
lp_do_global_parameter(lp_ctx, "ntptr providor", "simple_ldb");
lp_do_global_parameter(lp_ctx, "auth methods:domain controller", "anonymous sam_ignoredomain");
lp_do_global_parameter(lp_ctx, "auth methods:member server", "anonymous sam winbind");
@@ -2406,6 +2408,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lp_do_global_parameter(lp_ctx, "prefork children:smb", "4");
+ lp_do_global_parameter(lp_ctx, "oplocks", "true");
+
for (i = 0; parm_table[i].label; i++) {
if (!(lp_ctx->flags[i] & FLAG_CMDLINE)) {
lp_ctx->flags[i] |= FLAG_DEFAULT;
diff --git a/source4/param/share.h b/source4/param/share.h
index 51f45781c1..9f9cbdce5b 100644
--- a/source4/param/share.h
+++ b/source4/param/share.h
@@ -90,6 +90,7 @@ struct loadparm_context;
#define SHARE_MAP_ARCHIVE "map-archive"
#define SHARE_STRICT_LOCKING "strict-locking"
+#define SHARE_OPLOCKS "oplocks"
#define SHARE_STRICT_SYNC "strict-sync"
#define SHARE_MSDFS_ROOT "msdfs-root"
#define SHARE_CI_FILESYSTEM "ci-filesystem"
@@ -125,6 +126,7 @@ struct loadparm_context;
#define SHARE_MAP_ARCHIVE_DEFAULT true
#define SHARE_STRICT_LOCKING_DEFAULT true
+#define SHARE_OPLOCKS_DEFAULT true
#define SHARE_STRICT_SYNC_DEFAULT false
#define SHARE_MSDFS_ROOT_DEFAULT false
#define SHARE_CI_FILESYSTEM_DEFAULT false