summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/ntvfs/ntvfs_base.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index 3873afbdfa..28f43eabe8 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -201,8 +201,14 @@ NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, e
NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx)
{
+ static bool initialized = false;
init_module_fn static_init[] = STATIC_ntvfs_MODULES;
- init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "ntvfs");
+ init_module_fn *shared_init;
+
+ if (initialized) return NT_STATUS_OK;
+ initialized = true;
+
+ shared_init = load_samba_modules(NULL, lp_ctx, "ntvfs");
run_init_functions(static_init);
run_init_functions(shared_init);