diff options
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/param/util.c b/source4/param/util.c index af97903277..2453094798 100644 --- a/source4/param/util.c +++ b/source4/param/util.c @@ -169,7 +169,10 @@ _PUBLIC_ char *smbd_tmp_path(TALLOC_CTX *mem_ctx, const char *name) static char *modules_path(TALLOC_CTX* mem_ctx, const char *name) { - return talloc_asprintf(mem_ctx, "%s/%s", lp_modulesdir(), name); + const char *env_moduledir = getenv("LD_SAMBA_MODULE_PATH"); + return talloc_asprintf(mem_ctx, "%s/%s", + env_moduledir?env_moduledir:lp_modulesdir(), + name); } /** |