Ignore:
Timestamp:
Mar 1, 2010, 3:05:48 PM (15 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3.x to 3.3.11

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/docs/htmldocs/Samba3-Developers-Guide/modules.html

    r368 r411  
    1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 8. Modules</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt02.html" title="Part II. Samba Basics"><link rel="prev" href="contributing.html" title="Chapter 7. Contributing code"><link rel="next" href="pt03.html" title="Part III. Samba Subsystems"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. Modules</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="contributing.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="pt03.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 8. Modules"><div class="titlepage"><div><div><h2 class="title"><a name="modules"></a>Chapter 8. Modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate"> 19 March 2003 </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="modules.html#id2564642">Advantages</a></span></dt><dt><span class="sect1"><a href="modules.html#id2564680">Loading modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="modules.html#id2564706">Static modules</a></span></dt><dt><span class="sect2"><a href="modules.html#id2564738">Shared modules</a></span></dt></dl></dd><dt><span class="sect1"><a href="modules.html#id2564762">Writing modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="modules.html#id2564811">Static/Shared selection in configure.in</a></span></dt></dl></dd></dl></div><div class="sect1" title="Advantages"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2564642"></a>Advantages</h2></div></div></div><p>
     1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 8. Modules</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt02.html" title="Part II. Samba Basics"><link rel="prev" href="contributing.html" title="Chapter 7. Contributing code"><link rel="next" href="pt03.html" title="Part III. Samba Subsystems"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. Modules</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="contributing.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="pt03.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="modules"></a>Chapter 8. Modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="orgname">Samba Team</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate"> 19 March 2003 </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="modules.html#id2558570">Advantages</a></span></dt><dt><span class="sect1"><a href="modules.html#id2558608">Loading modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="modules.html#id2558634">Static modules</a></span></dt><dt><span class="sect2"><a href="modules.html#id2558666">Shared modules</a></span></dt></dl></dd><dt><span class="sect1"><a href="modules.html#id2558690">Writing modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="modules.html#id2558739">Static/Shared selection in configure.in</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2558570"></a>Advantages</h2></div></div></div><p>
    22The new modules system has the following advantages:
    3 </p><table border="0" summary="Simple list" class="simplelist"><tr><td>Transparent loading of static and shared modules (no need
    4 for a subsystem to know about modules)</td></tr><tr><td>Simple selection between shared and static modules at configure time</td></tr><tr><td>"preload modules" option for increasing performance for stable modules</td></tr><tr><td>No nasty #define stuff anymore</td></tr><tr><td>All backends are available as plugin now (including pdb_ldap and pdb_tdb)</td></tr></table></div><div class="sect1" title="Loading modules"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2564680"></a>Loading modules</h2></div></div></div><p>
     3</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Transparent loading of static and shared modules (no need
     4for a subsystem to know about modules)</td></tr><tr><td>Simple selection between shared and static modules at configure time</td></tr><tr><td>"preload modules" option for increasing performance for stable modules</td></tr><tr><td>No nasty #define stuff anymore</td></tr><tr><td>All backends are available as plugin now (including pdb_ldap and pdb_tdb)</td></tr></table></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2558608"></a>Loading modules</h2></div></div></div><p>
    55Some subsystems in samba use different backends. These backends can be
    66either statically linked in to samba or available as a plugin. A subsystem
     
    1212This function will be called by the initialisation function of the module to
    1313register itself.
    14 </p><div class="sect2" title="Static modules"><div class="titlepage"><div><div><h3 class="title"><a name="id2564706"></a>Static modules</h3></div></div></div><p>
     14</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2558634"></a>Static modules</h3></div></div></div><p>
    1515The modules system compiles a list of initialisation functions for the
    1616static modules of each subsystem. This is a define. For example,
     
    2222These functions should be called before the subsystem is used. That
    2323should be done when the subsystem is initialised or first used.
    24 </p></div><div class="sect2" title="Shared modules"><div class="titlepage"><div><div><h3 class="title"><a name="id2564738"></a>Shared modules</h3></div></div></div><p>
     24</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2558666"></a>Shared modules</h3></div></div></div><p>
    2525If a subsystem needs a certain backend, it should check if it has
    2626already been registered. If the backend hasn't been registered already,
     
    3232</p><p>After smb_probe_module() has been executed, the subsystem
    3333should check again if the module has been registered.
    34 </p></div></div><div class="sect1" title="Writing modules"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2564762"></a>Writing modules</h2></div></div></div><p>
     34</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2558690"></a>Writing modules</h2></div></div></div><p>
    3535Each module has an initialisation function. For modules that are
    3636included with samba this name is '<em class="replaceable"><code>subsystem</code></em>_<em class="replaceable"><code>backend</code></em>_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()).
     
    4747        return NT_STATUS_OK;
    4848}
    49 </pre><div class="sect2" title="Static/Shared selection in configure.in"><div class="titlepage"><div><div><h3 class="title"><a name="id2564811"></a>Static/Shared selection in configure.in</h3></div></div></div><p>
     49</pre><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2558739"></a>Static/Shared selection in configure.in</h3></div></div></div><p>
    5050Some macros in configure.in generate the various defines and substs that
    5151are necessary for the system to work correct. All modules that should
     
    6565be changed by ./configure are rebuilded in the 'modules_clean' make target.
    6666Practically, this means all c files that contain <code class="literal">static_init_subsystem;</code> calls need to be rebuilded.
    67 </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     67</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    6868There currently also is a configure.in command called SMB_MODULE_PROVIVES().
    6969This is used for modules that register multiple things. It should not
Note: See TracChangeset for help on using the changeset viewer.