diff options
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/config.mk | 25 | ||||
-rw-r--r-- | source4/param/loadparm.c | 6 | ||||
-rw-r--r-- | source4/param/share.c | 3 | ||||
-rw-r--r-- | source4/param/share.h | 2 | ||||
-rw-r--r-- | source4/param/share_classic.c | 4 |
5 files changed, 29 insertions, 11 deletions
diff --git a/source4/param/config.mk b/source4/param/config.mk index f43c9d8a1b..4b5af9b6cb 100644 --- a/source4/param/config.mk +++ b/source4/param/config.mk @@ -1,24 +1,26 @@ [SUBSYSTEM::LIBSAMBA-CONFIG] -OBJ_FILES = loadparm.o \ - params.o \ - generic.o \ - util.o \ - ../lib/version.o PUBLIC_DEPENDENCIES = LIBSAMBA-UTIL PRIVATE_DEPENDENCIES = DYNCONFIG LIBREPLACE_EXT CHARSET PRIVATE_PROTO_HEADER = proto.h +LIBSAMBA-CONFIG_OBJ_FILES = param/loadparm.o \ + param/params.o \ + param/generic.o \ + param/util.o \ + lib/version.o + PUBLIC_HEADERS += param/param.h ################################# # Start SUBSYSTEM share [SUBSYSTEM::share] PRIVATE_PROTO_HEADER = share_proto.h -OBJ_FILES = share.o PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL # End SUBSYSTEM share ################################# +share_OBJ_FILES = param/share.o + PUBLIC_HEADERS += param/share.h ################################################ @@ -26,25 +28,30 @@ PUBLIC_HEADERS += param/share.h [MODULE::share_classic] SUBSYSTEM = share INIT_FUNCTION = share_classic_init -OBJ_FILES = share_classic.o PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL # End MODULE share_classic ################################################ +share_classic_OBJ_FILES = param/share_classic.o + ################################################ # Start MODULE share_ldb [MODULE::share_ldb] SUBSYSTEM = share INIT_FUNCTION = share_ldb_init -OBJ_FILES = share_ldb.o PRIVATE_DEPENDENCIES = LIBLDB LDB_WRAP # End MODULE share_ldb ################################################ +share_ldb_OBJ_FILES = param/share_ldb.o + [SUBSYSTEM::SECRETS] -OBJ_FILES = secrets.o PRIVATE_DEPENDENCIES = LIBLDB TDB_WRAP UTIL_TDB NDR_SECURITY +SECRETS_OBJ_FILES = param/secrets.o + [PYTHON::param] SWIG_FILE = param.i PRIVATE_DEPENDENCIES = LIBSAMBA-CONFIG + +param_OBJ_FILES = param/param_wrap.o diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index a1d29b0771..812162e170 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; @@ -457,6 +458,7 @@ static struct parm_struct parm_table[] = { {"csc policy", P_ENUM, P_LOCAL, LOCAL_VAR(iCSCPolicy), NULL, enum_csc_policy}, {"strict locking", P_BOOL, P_LOCAL, LOCAL_VAR(bStrictLocking), NULL, NULL}, + {"oplocks", P_BOOL, P_LOCAL, LOCAL_VAR(bOplocks), NULL, NULL}, {"share backend", P_STRING, P_GLOBAL, GLOBAL_VAR(szShareBackend), NULL, NULL}, {"preload", P_STRING, P_GLOBAL, GLOBAL_VAR(szAutoServices), NULL, NULL}, @@ -715,6 +717,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) @@ -2250,6 +2253,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx) lp_ctx->sDefault->bRead_only = true; lp_ctx->sDefault->bMap_archive = true; lp_ctx->sDefault->bStrictLocking = true; + lp_ctx->sDefault->bOplocks = true; lp_ctx->sDefault->iCreate_mask = 0744; lp_ctx->sDefault->iCreate_force_mode = 0000; lp_ctx->sDefault->iDir_mask = 0755; @@ -2292,7 +2296,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"); diff --git a/source4/param/share.c b/source4/param/share.c index bc2999b03d..2727518c05 100644 --- a/source4/param/share.c +++ b/source4/param/share.c @@ -21,7 +21,6 @@ #include "includes.h" #include "param/share.h" -#include "build.h" #include "param/param.h" const char *share_string_option(struct share_config *scfg, const char *opt_name, const char *defval) @@ -146,6 +145,8 @@ NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name */ NTSTATUS share_init(void) { + extern NTSTATUS share_ldb_init(void); + extern NTSTATUS share_classic_init(void); init_module_fn static_init[] = { STATIC_share_MODULES }; run_init_functions(static_init); 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 diff --git a/source4/param/share_classic.c b/source4/param/share_classic.c index f5a6fa67a4..c3adc4473c 100644 --- a/source4/param/share_classic.c +++ b/source4/param/share_classic.c @@ -213,6 +213,10 @@ static bool sclassic_bool_option(struct share_config *scfg, const char *opt_name return lp_strict_locking(s, lp_default_service(lp_ctx)); } + if (strcmp(opt_name, SHARE_OPLOCKS) == 0) { + return lp_oplocks(s, lp_default_service(lp_ctx)); + } + if (strcmp(opt_name, SHARE_STRICT_SYNC) == 0) { return lp_strict_sync(s, lp_default_service(lp_ctx)); } |