From f1687970584d5b9090cc6b338d0ce35277b26ba4 Mon Sep 17 00:00:00 2001 From: vorlon Date: Mon, 29 Sep 2008 05:10:20 +0000 Subject: Load samba-3.2.4 into branches/samba/upstream. git-svn-id: svn://svn.debian.org/svn/pkg-samba/branches/samba/upstream@2163 fc4039ab-9d04-0410-8cac-899223bdd6b0 --- docs/htmldocs/Samba3-Developers-Guide/modules.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/htmldocs/Samba3-Developers-Guide/modules.html') diff --git a/docs/htmldocs/Samba3-Developers-Guide/modules.html b/docs/htmldocs/Samba3-Developers-Guide/modules.html index ffe3f28da7..ae9d13ed77 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/modules.html +++ b/docs/htmldocs/Samba3-Developers-Guide/modules.html @@ -1,7 +1,7 @@ -Chapter 8. Modules

Chapter 8. Modules

Jelmer Vernooij

Samba Team

19 March 2003

Advantages

+Chapter 8. Modules

Chapter 8. Modules

Jelmer Vernooij

Samba Team

19 March 2003

Advantages

The new modules system has the following advantages:

Transparent loading of static and shared modules (no need -for a subsystem to know about modules)
Simple selection between shared and static modules at configure time
"preload modules" option for increasing performance for stable modules
No nasty #define stuff anymore
All backends are available as plugin now (including pdb_ldap and pdb_tdb)

Loading modules

+for a subsystem to know about modules)Simple selection between shared and static modules at configure time"preload modules" option for increasing performance for stable modulesNo nasty #define stuff anymoreAll backends are available as plugin now (including pdb_ldap and pdb_tdb)

Loading modules

Some subsystems in samba use different backends. These backends can be either statically linked in to samba or available as a plugin. A subsystem should have a function that allows a module to register itself. For example, @@ -11,7 +11,7 @@ NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function in

This function will be called by the initialisation function of the module to register itself. -

Static modules

+

Static modules

The modules system compiles a list of initialisation functions for the static modules of each subsystem. This is a define. For example, it is here currently (from include/config.h): @@ -21,7 +21,7 @@ it is here currently (from include/config.h):

These functions should be called before the subsystem is used. That should be done when the subsystem is initialised or first used. -

Shared modules

+

Shared modules

If a subsystem needs a certain backend, it should check if it has already been registered. If the backend hasn't been registered already, the subsystem should call smb_probe_module(char *subsystem, char *backend). @@ -31,7 +31,7 @@ is a slash, smb_probe_module() tries to load the module from the absolute path specified in 'backend'.

After smb_probe_module() has been executed, the subsystem should check again if the module has been registered. -

Writing modules

+

Writing modules

Each module has an initialisation function. For modules that are included with samba this name is 'subsystem_backend_init'. For external modules (that will never be built-in, but only available as a module) this name is always 'init_module'. (In the case of modules included with samba, the configure system will add a #define subsystem_backend_init() init_module()). The prototype for these functions is: @@ -46,7 +46,7 @@ smb_register_passdb(PASSDB_INTERFACE_VERSION, "ldapsam", pdb_init_ldapsam); smb_register_passdb(PASSDB_INTERFACE_VERSION, "ldapsam_nua", pdb_init_ldapsam_nua); return NT_STATUS_OK; } -

Static/Shared selection in configure.in

+

Static/Shared selection in configure.in

Some macros in configure.in generate the various defines and substs that are necessary for the system to work correct. All modules that should be built by default have to be added to the variable 'default_modules'. -- cgit v1.2.3