From 97fe71c1f54551dfddf5430c185c45d2b881124f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 4 Apr 2006 16:20:32 +0000 Subject: r14909: Add lp_modulesdir() smb.conf option (This used to be commit eaa68826d34c2bebc3df5e96aed2102debb67964) --- source4/param/loadparm.c | 4 ++++ source4/param/util.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/param') diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index ed66fd093c..922e2f0f04 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -98,6 +98,7 @@ typedef struct char *ncalrpc_dir; char *display_charset; char *szLockDir; + char *szModulesDir; char *szPidDir; char *szSetupDir; char *szServerString; @@ -528,6 +529,7 @@ static struct parm_struct parm_table[] = { {"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_HIDE}, {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, + {"modules dir", P_STRING, P_GLOBAL, &Globals.szModulesDir, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, {"pid directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, {"js include", P_LIST, P_GLOBAL, &Globals.jsInclude, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, {"setup directory", P_STRING, P_GLOBAL, &Globals.szSetupDir, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, @@ -629,6 +631,7 @@ static void init_globals(void) do_parameter("pid directory", dyn_PIDDIR, NULL); do_parameter("lock dir", dyn_LOCKDIR, NULL); + do_parameter("modules dir", dyn_MODULESDIR, NULL); do_parameter("ncalrpc dir", dyn_NCALRPCDIR, NULL); do_parameter("socket address", "0.0.0.0", NULL); @@ -828,6 +831,7 @@ _PUBLIC_ FN_GLOBAL_BOOL(lp_winbind_sealed_pipes, &Globals.bWinbindSealedPipes) _PUBLIC_ FN_GLOBAL_STRING(lp_private_dir, &Globals.szPrivateDir) _PUBLIC_ FN_GLOBAL_STRING(lp_serverstring, &Globals.szServerString) _PUBLIC_ FN_GLOBAL_STRING(lp_lockdir, &Globals.szLockDir) +_PUBLIC_ FN_GLOBAL_STRING(lp_modulesdir, &Globals.szModulesDir) _PUBLIC_ FN_GLOBAL_STRING(lp_setupdir, &Globals.szSetupDir) _PUBLIC_ FN_GLOBAL_STRING(lp_ncalrpc_dir, &Globals.ncalrpc_dir) _PUBLIC_ FN_GLOBAL_STRING(lp_piddir, &Globals.szPidDir) diff --git a/source4/param/util.c b/source4/param/util.c index 85a0587827..b3df175e43 100644 --- a/source4/param/util.c +++ b/source4/param/util.c @@ -170,7 +170,7 @@ _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", dyn_MODULESDIR, name); + return talloc_asprintf(mem_ctx, "%s/%s", lp_modulesdir(), name); } /** @@ -184,6 +184,7 @@ _PUBLIC_ init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx, const char *sub char *path = modules_path(mem_ctx, subsystem); init_module_fn *ret; + printf("MODULESDIR: %s\n", path); ret = load_modules(mem_ctx, path); talloc_free(path); -- cgit