summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-02-27 01:54:41 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-02-27 01:54:41 +0000
commitd21b15ff57aa39337e76a06da74a55e48f4b0696 (patch)
tree0014fddd1c908fd1366bba57d4a3616b934fe148 /source3/lib
parentd62f60f53ac18b3de9c7922105c6796361b91a11 (diff)
downloadsamba-d21b15ff57aa39337e76a06da74a55e48f4b0696.tar.gz
samba-d21b15ff57aa39337e76a06da74a55e48f4b0696.tar.bz2
samba-d21b15ff57aa39337e76a06da74a55e48f4b0696.zip
- Rename 'modules = ' to 'preload modules = '
- Add smb_probe_module() - Add init_modules() - Call these functions (This used to be commit f8f21653225792c0001d183c6efe8b7d89a0785d)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/module.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/source3/lib/module.c b/source3/lib/module.c
index dd94f79950..4e2fe48af7 100644
--- a/source3/lib/module.c
+++ b/source3/lib/module.c
@@ -75,18 +75,47 @@ int smb_load_modules(const char **modules)
return success;
}
+int smb_probe_module(const char *subsystem, const char *module)
+{
+ pstring full_path;
+
+ /* Check for absolute path */
+ if(module[0] == '/')return smb_load_module(module);
+
+ pstrcpy(full_path, lib_path(subsystem));
+ pstrcat(full_path, "/");
+ pstrcat(full_path, module);
+ pstrcat(full_path, ".");
+ pstrcat(full_path, shlib_ext());
+
+ return smb_load_module(full_path);
+}
+
#else /* HAVE_DLOPEN */
int smb_load_module(const char *module_name)
{
- DEBUG(0,("This samba executable has not been build with plugin support"));
+ DEBUG(0,("This samba executable has not been built with plugin support"));
return False;
}
int smb_load_modules(const char **modules)
{
- DEBUG(0,("This samba executable has not been build with plugin support"));
- return -1;
+ DEBUG(0,("This samba executable has not been built with plugin support"));
+ return False;
+}
+
+int smb_probe_module(const char *subsystem, const char *module)
+{
+ DEBUG(0,("This samba executable has not been built with plugin support, not probing"));
+ return False;
}
#endif /* HAVE_DLOPEN */
+
+void init_modules(void)
+{
+ if(lp_preload_modules())
+ smb_load_modules(lp_preload_modules());
+ /* FIXME: load static modules */
+}