summaryrefslogtreecommitdiffstats
path: root/docs/htmldocs/Samba-Developers-Guide.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/htmldocs/Samba-Developers-Guide.html')
-rw-r--r--docs/htmldocs/Samba-Developers-Guide.html36
1 files changed, 19 insertions, 17 deletions
diff --git a/docs/htmldocs/Samba-Developers-Guide.html b/docs/htmldocs/Samba-Developers-Guide.html
index 64c78025edb..c16b48441b8 100644
--- a/docs/htmldocs/Samba-Developers-Guide.html
+++ b/docs/htmldocs/Samba-Developers-Guide.html
@@ -34,7 +34,7 @@ Print Queue TDB's
ChangeID and Client Caching of Printer Information
</a></dt><dt><a href="#id2877045">
Windows NT/2K Printer Change Notify
-</a></dt></dl></dd><dt>12. <a href="#wins">Samba WINS Internals</a></dt><dd><dl><dt><a href="#id2877426">WINS Failover</a></dt></dl></dd><dt>13. <a href="#sam">The Upcoming SAM System</a></dt><dd><dl><dt><a href="#id2877582">Security in the 'new SAM'</a></dt><dt><a href="#id2877712">Standalone from UNIX</a></dt><dt><a href="#id2877739">Handles and Races in the new SAM</a></dt><dt><a href="#id2877808">Layers</a></dt><dd><dl><dt><a href="#id2877815">Application</a></dt><dt><a href="#id2877831">SAM Interface</a></dt><dt><a href="#id2877859">SAM Modules</a></dt></dl></dd><dt><a href="#id2877880">SAM Modules</a></dt><dd><dl><dt><a href="#id2877888">Special Module: sam_passdb</a></dt><dt><a href="#id2877906">sam_ads</a></dt></dl></dd><dt><a href="#id2877935">Memory Management</a></dt><dt><a href="#id2878035">Testing</a></dt></dl></dd><dt>14. <a href="#pwencrypt">LanMan and NT Password Encryption</a></dt><dd><dl><dt><a href="#id2878174">Introduction</a></dt><dt><a href="#id2878193">How does it work?</a></dt><dt><a href="#id2878320">The smbpasswd file</a></dt></dl></dd><dt>15. <a href="#modules">Modules</a></dt><dd><dl><dt><a href="#id2878688">Advantages</a></dt><dt><a href="#id2878737">Loading modules</a></dt><dd><dl><dt><a href="#id2878771">Static modules</a></dt><dt><a href="#id2878811">Shared modules</a></dt></dl></dd><dt><a href="#id2878839">Writing modules</a></dt><dd><dl><dt><a href="#id2878904">Static/Shared selection in configure.in</a></dt></dl></dd></dl></dd><dt>16. <a href="#rpc-plugin">RPC Pluggable Modules</a></dt><dd><dl><dt><a href="#id2879089">About</a></dt><dt><a href="#id2879107">General Overview</a></dt></dl></dd><dt>17. <a href="#vfs">VFS Modules</a></dt><dd><dl><dt><a href="#id2879316">The Samba (Posix) VFS layer</a></dt><dd><dl><dt><a href="#id2879324">The general interface</a></dt><dt><a href="#id2879439">Possible VFS operation layers</a></dt></dl></dd><dt><a href="#id2879511">The Interaction between the Samba VFS subsystem and the modules</a></dt><dd><dl><dt><a href="#id2879518">Initialization and registration</a></dt><dt><a href="#id2879711">How the Modules handle per connection data</a></dt></dl></dd><dt><a href="#id2879954">Upgrading to the New VFS Interface</a></dt><dd><dl><dt><a href="#id2879961">Upgrading from 2.2.* and 3.0aplha modules</a></dt></dl></dd><dt><a href="#id2880504">Some Notes</a></dt><dd><dl><dt><a href="#id2880511">Implement TRANSPARENT functions</a></dt><dt><a href="#id2880536">Implement OPAQUE functions</a></dt></dl></dd></dl></dd><dt>18. <a href="#Packaging">Notes to packagers</a></dt><dd><dl><dt><a href="#id2880603">Versioning</a></dt><dt><a href="#id2880638">Modules</a></dt></dl></dd><dt>19. <a href="#contributing">Contributing code</a></dt></dl></div><div class="preface" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2865348"></a>Attributions</h2></div></div><div></div></div><p><a href="#netbios" title="Chapter 1. Definition of NetBIOS Protocol and Name Resolution Modes">Definition of NetBIOS Protocol and Name Resolution Modes</a></p><div class="itemizedlist"><ul type="disc"><li><p>Luke Leighton</p></li></ul></div><p><a href="#architecture" title="Chapter 2. Samba Architecture">Samba Architecture</a></p><div class="itemizedlist"><ul type="disc"><li><p>Dan Shearer</p></li></ul></div><p><a href="#debug" title="Chapter 3. The samba DEBUG system">The samba DEBUG system</a></p><div class="itemizedlist"><ul type="disc"><li><p>Chris Hertel</p></li></ul></div><p><a href="#CodingSuggestions" title="Chapter 4. Coding Suggestions">Coding Suggestions</a></p><div class="itemizedlist"><ul type="disc"><li><p>Steve French</p></li><li><p>Simo Sorce</p></li><li><p>Andrew Bartlett</p></li><li><p>Tim Potter</p></li><li><p>Martin Pool</p></li></ul></div><p><a href="#internals" title="Chapter 5. Samba Internals">Samba Internals</a></p><div class="itemizedlist"><ul type="disc"><li><p>David Chappell &lt;<a href="mailto:David.Chappell@mail.trincoll.edu" target="_top">David.Chappell@mail.trincoll.edu</a>&gt;</p></li></ul></div><p><a href="#parsing" title="Chapter 6. The smb.conf file">The smb.conf file</a></p><div class="itemizedlist"><ul type="disc"><li><p>Chris Hertel</p></li></ul></div><p><a href="#unix-smb" title="Chapter 7. NetBIOS in a Unix World">NetBIOS in a Unix World</a></p><div class="itemizedlist"><ul type="disc"><li><p>Andrew Tridgell</p></li></ul></div><p><a href="#tracing" title="Chapter 8. Tracing samba system calls">Tracing samba system calls</a></p><div class="itemizedlist"><ul type="disc"><li><p>Andrew Tridgell</p></li></ul></div><p><a href="#windows-debug" title="Chapter 9. Finding useful information on windows">Finding useful information on windows</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer R. Vernooij &lt;<a href="mailto:jelmer@samba.org" target="_top">jelmer@samba.org</a>&gt;</p></li><li><p>Andrew Tridgell &lt;<a href="mailto:tridge@samba.org" target="_top">tridge@samba.org</a>&gt;</p></li></ul></div><p><a href="#ntdomain" title="Chapter 10. NT Domain RPC's">NT Domain RPC's</a></p><div class="itemizedlist"><ul type="disc"><li><p>Luke Leighton &lt;<a href="mailto:lkcl@switchboard.net" target="_top">lkcl@switchboard.net</a>&gt;</p></li><li><p>Paul Ashton &lt;<a href="mailto:paul@argo.demon.co.uk" target="_top">paul@argo.demon.co.uk</a>&gt;</p></li><li><p>Duncan Stansfield &lt;<a href="mailto:duncans@sco.com" target="_top">duncans@sco.com</a>&gt;</p></li></ul></div><p><a href="#printing" title="Chapter 11. Samba Printing Internals">Samba Printing Internals</a></p><div class="itemizedlist"><ul type="disc"><li><p>Gerald Carter</p></li></ul></div><p><a href="#wins" title="Chapter 12. Samba WINS Internals">Samba WINS Internals</a></p><div class="itemizedlist"><ul type="disc"><li><p>Gerald Carter</p></li></ul></div><p><a href="#sam" title="Chapter 13. The Upcoming SAM System">The Upcoming SAM System</a></p><div class="itemizedlist"><ul type="disc"><li><p>Andrew Bartlett</p></li></ul></div><p><a href="#pwencrypt" title="Chapter 14. LanMan and NT Password Encryption">LanMan and NT Password Encryption</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jeremy Allison &lt;<a href="mailto:samba@samba.org" target="_top">samba@samba.org</a>&gt;</p></li></ul></div><p><a href="#modules" title="Chapter 15. Modules">Modules</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer Vernooij &lt;<a href="mailto:jelmer@samba.org" target="_top">jelmer@samba.org</a>&gt;</p></li></ul></div><p><a href="#rpc-plugin" title="Chapter 16. RPC Pluggable Modules">RPC Pluggable Modules</a></p><div class="itemizedlist"><ul type="disc"><li><p>Anthony Liguori &lt;<a href="mailto:aliguor@us.ibm.com" target="_top">aliguor@us.ibm.com</a>&gt;</p></li><li><p>Jelmer Vernooij &lt;<a href="mailto:jelmer@samba.org" target="_top">jelmer@samba.org</a>&gt;</p></li></ul></div><p><a href="#vfs" title="Chapter 17. VFS Modules">VFS Modules</a></p><div class="itemizedlist"><ul type="disc"><li><p>Alexander Bokovoy &lt;<a href="mailto:ab@samba.org" target="_top">ab@samba.org</a>&gt;</p></li><li><p>Stefan Metzmacher &lt;<a href="mailto:metze@metzemix.de" target="_top">metze@metzemix.de</a>&gt;</p></li></ul></div><p><a href="#Packaging" title="Chapter 18. Notes to packagers">Notes to packagers</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer Vernooij</p></li></ul></div><p><a href="#contributing" title="Chapter 19. Contributing code">Contributing code</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer R. Vernooij &lt;<a href="mailto:jelmer@samba.org" target="_top">jelmer@samba.org</a>&gt;</p></li></ul></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="netbios"></a>Chapter 1. Definition of NetBIOS Protocol and Name Resolution Modes</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Luke</span> <span class="surname">Leighton</span></h3></div></div><div><p class="pubdate">12 June 1997</p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2797071">NETBIOS</a></dt><dt><a href="#id2797155">BROADCAST NetBIOS</a></dt><dt><a href="#id2797186">NBNS NetBIOS</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2797071"></a>NETBIOS</h2></div></div><div></div></div><p>
+</a></dt></dl></dd><dt>12. <a href="#wins">Samba WINS Internals</a></dt><dd><dl><dt><a href="#id2877426">WINS Failover</a></dt></dl></dd><dt>13. <a href="#sam">The Upcoming SAM System</a></dt><dd><dl><dt><a href="#id2877582">Security in the 'new SAM'</a></dt><dt><a href="#id2877712">Standalone from UNIX</a></dt><dt><a href="#id2877739">Handles and Races in the new SAM</a></dt><dt><a href="#id2877808">Layers</a></dt><dd><dl><dt><a href="#id2877815">Application</a></dt><dt><a href="#id2877831">SAM Interface</a></dt><dt><a href="#id2877859">SAM Modules</a></dt></dl></dd><dt><a href="#id2877880">SAM Modules</a></dt><dd><dl><dt><a href="#id2877888">Special Module: sam_passdb</a></dt><dt><a href="#id2877906">sam_ads</a></dt></dl></dd><dt><a href="#id2877935">Memory Management</a></dt><dt><a href="#id2878035">Testing</a></dt></dl></dd><dt>14. <a href="#pwencrypt">LanMan and NT Password Encryption</a></dt><dd><dl><dt><a href="#id2878174">Introduction</a></dt><dt><a href="#id2878193">How does it work?</a></dt><dt><a href="#id2878320">The smbpasswd file</a></dt></dl></dd><dt>15. <a href="#modules">Modules</a></dt><dd><dl><dt><a href="#id2878688">Advantages</a></dt><dt><a href="#id2878737">Loading modules</a></dt><dd><dl><dt><a href="#id2878771">Static modules</a></dt><dt><a href="#id2878811">Shared modules</a></dt></dl></dd><dt><a href="#id2878839">Writing modules</a></dt><dd><dl><dt><a href="#id2878904">Static/Shared selection in configure.in</a></dt></dl></dd></dl></dd><dt>16. <a href="#rpc-plugin">RPC Pluggable Modules</a></dt><dd><dl><dt><a href="#id2879098">About</a></dt><dt><a href="#id2879116">General Overview</a></dt></dl></dd><dt>17. <a href="#vfs">VFS Modules</a></dt><dd><dl><dt><a href="#id2879326">The Samba (Posix) VFS layer</a></dt><dd><dl><dt><a href="#id2879332">The general interface</a></dt><dt><a href="#id2879448">Possible VFS operation layers</a></dt></dl></dd><dt><a href="#id2879520">The Interaction between the Samba VFS subsystem and the modules</a></dt><dd><dl><dt><a href="#id2879528">Initialization and registration</a></dt><dt><a href="#id2879720">How the Modules handle per connection data</a></dt></dl></dd><dt><a href="#id2879963">Upgrading to the New VFS Interface</a></dt><dd><dl><dt><a href="#id2879970">Upgrading from 2.2.* and 3.0aplha modules</a></dt></dl></dd><dt><a href="#id2880501">Some Notes</a></dt><dd><dl><dt><a href="#id2880508">Implement TRANSPARENT functions</a></dt><dt><a href="#id2880533">Implement OPAQUE functions</a></dt></dl></dd></dl></dd><dt>18. <a href="#Packaging">Notes to packagers</a></dt><dd><dl><dt><a href="#id2880600">Versioning</a></dt><dt><a href="#id2880635">Modules</a></dt></dl></dd><dt>19. <a href="#contributing">Contributing code</a></dt></dl></div><div class="preface" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2865348"></a>Attributions</h2></div></div><div></div></div><p><a href="#netbios" title="Chapter 1. Definition of NetBIOS Protocol and Name Resolution Modes">Definition of NetBIOS Protocol and Name Resolution Modes</a></p><div class="itemizedlist"><ul type="disc"><li><p>Luke Leighton</p></li></ul></div><p><a href="#architecture" title="Chapter 2. Samba Architecture">Samba Architecture</a></p><div class="itemizedlist"><ul type="disc"><li><p>Dan Shearer</p></li></ul></div><p><a href="#debug" title="Chapter 3. The samba DEBUG system">The samba DEBUG system</a></p><div class="itemizedlist"><ul type="disc"><li><p>Chris Hertel</p></li></ul></div><p><a href="#CodingSuggestions" title="Chapter 4. Coding Suggestions">Coding Suggestions</a></p><div class="itemizedlist"><ul type="disc"><li><p>Steve French</p></li><li><p>Simo Sorce</p></li><li><p>Andrew Bartlett</p></li><li><p>Tim Potter</p></li><li><p>Martin Pool</p></li></ul></div><p><a href="#internals" title="Chapter 5. Samba Internals">Samba Internals</a></p><div class="itemizedlist"><ul type="disc"><li><p>David Chappell &lt;<a href="mailto:David.Chappell@mail.trincoll.edu" target="_top">David.Chappell@mail.trincoll.edu</a>&gt;</p></li></ul></div><p><a href="#parsing" title="Chapter 6. The smb.conf file">The smb.conf file</a></p><div class="itemizedlist"><ul type="disc"><li><p>Chris Hertel</p></li></ul></div><p><a href="#unix-smb" title="Chapter 7. NetBIOS in a Unix World">NetBIOS in a Unix World</a></p><div class="itemizedlist"><ul type="disc"><li><p>Andrew Tridgell</p></li></ul></div><p><a href="#tracing" title="Chapter 8. Tracing samba system calls">Tracing samba system calls</a></p><div class="itemizedlist"><ul type="disc"><li><p>Andrew Tridgell</p></li></ul></div><p><a href="#windows-debug" title="Chapter 9. Finding useful information on windows">Finding useful information on windows</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer R. Vernooij &lt;<a href="mailto:jelmer@samba.org" target="_top">jelmer@samba.org</a>&gt;</p></li><li><p>Andrew Tridgell &lt;<a href="mailto:tridge@samba.org" target="_top">tridge@samba.org</a>&gt;</p></li></ul></div><p><a href="#ntdomain" title="Chapter 10. NT Domain RPC's">NT Domain RPC's</a></p><div class="itemizedlist"><ul type="disc"><li><p>Luke Leighton &lt;<a href="mailto:lkcl@switchboard.net" target="_top">lkcl@switchboard.net</a>&gt;</p></li><li><p>Paul Ashton &lt;<a href="mailto:paul@argo.demon.co.uk" target="_top">paul@argo.demon.co.uk</a>&gt;</p></li><li><p>Duncan Stansfield &lt;<a href="mailto:duncans@sco.com" target="_top">duncans@sco.com</a>&gt;</p></li></ul></div><p><a href="#printing" title="Chapter 11. Samba Printing Internals">Samba Printing Internals</a></p><div class="itemizedlist"><ul type="disc"><li><p>Gerald Carter</p></li></ul></div><p><a href="#wins" title="Chapter 12. Samba WINS Internals">Samba WINS Internals</a></p><div class="itemizedlist"><ul type="disc"><li><p>Gerald Carter</p></li></ul></div><p><a href="#sam" title="Chapter 13. The Upcoming SAM System">The Upcoming SAM System</a></p><div class="itemizedlist"><ul type="disc"><li><p>Andrew Bartlett</p></li></ul></div><p><a href="#pwencrypt" title="Chapter 14. LanMan and NT Password Encryption">LanMan and NT Password Encryption</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jeremy Allison &lt;<a href="mailto:samba@samba.org" target="_top">samba@samba.org</a>&gt;</p></li></ul></div><p><a href="#modules" title="Chapter 15. Modules">Modules</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer Vernooij &lt;<a href="mailto:jelmer@samba.org" target="_top">jelmer@samba.org</a>&gt;</p></li></ul></div><p><a href="#rpc-plugin" title="Chapter 16. RPC Pluggable Modules">RPC Pluggable Modules</a></p><div class="itemizedlist"><ul type="disc"><li><p>Anthony Liguori &lt;<a href="mailto:aliguor@us.ibm.com" target="_top">aliguor@us.ibm.com</a>&gt;</p></li><li><p>Jelmer Vernooij &lt;<a href="mailto:jelmer@samba.org" target="_top">jelmer@samba.org</a>&gt;</p></li></ul></div><p><a href="#vfs" title="Chapter 17. VFS Modules">VFS Modules</a></p><div class="itemizedlist"><ul type="disc"><li><p>Alexander Bokovoy &lt;<a href="mailto:ab@samba.org" target="_top">ab@samba.org</a>&gt;</p></li><li><p>Stefan Metzmacher &lt;<a href="mailto:metze@metzemix.de" target="_top">metze@metzemix.de</a>&gt;</p></li></ul></div><p><a href="#Packaging" title="Chapter 18. Notes to packagers">Notes to packagers</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer Vernooij</p></li></ul></div><p><a href="#contributing" title="Chapter 19. Contributing code">Contributing code</a></p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer R. Vernooij &lt;<a href="mailto:jelmer@samba.org" target="_top">jelmer@samba.org</a>&gt;</p></li></ul></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="netbios"></a>Chapter 1. Definition of NetBIOS Protocol and Name Resolution Modes</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Luke</span> <span class="surname">Leighton</span></h3></div></div><div><p class="pubdate">12 June 1997</p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2797071">NETBIOS</a></dt><dt><a href="#id2797155">BROADCAST NetBIOS</a></dt><dt><a href="#id2797186">NBNS NetBIOS</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2797071"></a>NETBIOS</h2></div></div><div></div></div><p>
NetBIOS runs over the following tranports: TCP/IP; NetBEUI and IPX/SPX.
Samba only uses NetBIOS over TCP/IP. For details on the TCP/IP NetBIOS
Session Service NetBIOS Datagram Service, and NetBIOS Names, see
@@ -1998,22 +1998,24 @@ On the bottom of configure.in, SMB_MODULE() should be called
for each module and SMB_SUBSYSTEM() for each subsystem.
</p><p>Syntax:</p><pre class="programlisting">
SMB_MODULE(<i class="replaceable"><tt>subsystem</tt></i>_<i class="replaceable"><tt>backend</tt></i>, <i class="replaceable"><tt>object files</tt></i>, <i class="replaceable"><tt>plugin name</tt></i>, <i class="replaceable"><tt>subsystem name</tt></i>, <i class="replaceable"><tt>static_action</tt></i>, <i class="replaceable"><tt>shared_action</tt></i>)
-SMB_SUBSYSTEM(<i class="replaceable"><tt>subsystem</tt></i>)
-</pre><p>Also, make sure to add the correct directives to
-<tt class="filename">Makefile.in</tt>. <i class="replaceable"><tt>@SUBSYSTEM_STATIC@</tt></i>
-will be replaced with a list of objects files of the modules that need to
-be linked in statically. <i class="replaceable"><tt>@SUBSYSTEM_MODULES@</tt></i> will
+SMB_SUBSYSTEM(<i class="replaceable"><tt>subsystem</tt></i>,<i class="replaceable"><tt>depfile</tt></i>)
+</pre><p>The depfile for a certain subsystem is the file that calls the
+initialisation functions for the statically built in modules.</p><p>
+<i class="replaceable"><tt>@SUBSYSTEM_MODULES@</tt></i> in Makefile.in will
be replaced with the names of the plugins to build.
</p><p>You must make sure all .c files that contain defines that can
be changed by ./configure are rebuilded in the 'modules_clean' make target.
Practically, this means all c files that contain <b class="command">static_init_subsystem;</b> calls need to be rebuilded.
-</p></div></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="rpc-plugin"></a>Chapter 16. RPC Pluggable Modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Anthony</span> <span class="surname">Liguori</span></h3><div class="affiliation"><span class="orgname">IBM<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:aliguor@us.ibm.com">aliguor@us.ibm.com</a>&gt;</tt></p></div></div></div></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><tt class="email">&lt;<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate">January 2003</p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2879089">About</a></dt><dt><a href="#id2879107">General Overview</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879089"></a>About</h2></div></div><div></div></div><p>
+</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
+There currently also is a configure.in command called SMB_MODULE_PROVIVES().
+This is used for modules that register multiple things. It should not
+be used as probing will most likely disappear in the future.</p></div></div></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="rpc-plugin"></a>Chapter 16. RPC Pluggable Modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Anthony</span> <span class="surname">Liguori</span></h3><div class="affiliation"><span class="orgname">IBM<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:aliguor@us.ibm.com">aliguor@us.ibm.com</a>&gt;</tt></p></div></div></div></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><tt class="email">&lt;<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate">January 2003</p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2879098">About</a></dt><dt><a href="#id2879116">General Overview</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879098"></a>About</h2></div></div><div></div></div><p>
This document describes how to make use the new RPC Pluggable Modules features
of Samba 3.0. This architecture was added to increase the maintainability of
Samba allowing RPC Pipes to be worked on separately from the main CVS branch.
The RPM architecture will also allow third-party vendors to add functionality
to Samba through plug-ins.
-</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879107"></a>General Overview</h2></div></div><div></div></div><p>
+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879116"></a>General Overview</h2></div></div><div></div></div><p>
When an RPC call is sent to smbd, smbd tries to load a shared library by the
name <tt class="filename">librpc_&lt;pipename&gt;.so</tt> to handle the call if
it doesn't know how to handle the call internally. For instance, LSA calls
@@ -2030,7 +2032,7 @@ NTSTATUS rpc_pipe_register_commands(int version, const char *clnt, const char *s
argument.</p></dd><dt><span class="term">clnt</span></dt><dd><p>the Client name of the named pipe</p></dd><dt><span class="term">srv</span></dt><dd><p>the Server name of the named pipe</p></dd><dt><span class="term">cmds</span></dt><dd><p>a list of api_structs that map RPC ordinal numbers to function calls</p></dd><dt><span class="term">size</span></dt><dd><p>the number of api_structs contained in cmds</p></dd></dl></div><p>
See rpc_server/srv_reg.c and rpc_server/srv_reg_nt.c for a small example of
how to use this library.
-</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="vfs"></a>Chapter 17. VFS Modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Alexander</span> <span class="surname">Bokovoy</span></h3><div class="affiliation"><div class="address"><p><tt class="email">&lt;<a href="mailto:ab@samba.org">ab@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Stefan</span> <span class="surname">Metzmacher</span></h3><div class="affiliation"><div class="address"><p><tt class="email">&lt;<a href="mailto:metze@metzemix.de">metze@metzemix.de</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate"> 27 May 2003 </p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2879316">The Samba (Posix) VFS layer</a></dt><dd><dl><dt><a href="#id2879324">The general interface</a></dt><dt><a href="#id2879439">Possible VFS operation layers</a></dt></dl></dd><dt><a href="#id2879511">The Interaction between the Samba VFS subsystem and the modules</a></dt><dd><dl><dt><a href="#id2879518">Initialization and registration</a></dt><dt><a href="#id2879711">How the Modules handle per connection data</a></dt></dl></dd><dt><a href="#id2879954">Upgrading to the New VFS Interface</a></dt><dd><dl><dt><a href="#id2879961">Upgrading from 2.2.* and 3.0aplha modules</a></dt></dl></dd><dt><a href="#id2880504">Some Notes</a></dt><dd><dl><dt><a href="#id2880511">Implement TRANSPARENT functions</a></dt><dt><a href="#id2880536">Implement OPAQUE functions</a></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879316"></a>The Samba (Posix) VFS layer</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879324"></a>The general interface</h3></div></div><div></div></div><p>
+</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="vfs"></a>Chapter 17. VFS Modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Alexander</span> <span class="surname">Bokovoy</span></h3><div class="affiliation"><div class="address"><p><tt class="email">&lt;<a href="mailto:ab@samba.org">ab@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Stefan</span> <span class="surname">Metzmacher</span></h3><div class="affiliation"><div class="address"><p><tt class="email">&lt;<a href="mailto:metze@metzemix.de">metze@metzemix.de</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate"> 27 May 2003 </p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2879326">The Samba (Posix) VFS layer</a></dt><dd><dl><dt><a href="#id2879332">The general interface</a></dt><dt><a href="#id2879448">Possible VFS operation layers</a></dt></dl></dd><dt><a href="#id2879520">The Interaction between the Samba VFS subsystem and the modules</a></dt><dd><dl><dt><a href="#id2879528">Initialization and registration</a></dt><dt><a href="#id2879720">How the Modules handle per connection data</a></dt></dl></dd><dt><a href="#id2879963">Upgrading to the New VFS Interface</a></dt><dd><dl><dt><a href="#id2879970">Upgrading from 2.2.* and 3.0aplha modules</a></dt></dl></dd><dt><a href="#id2880501">Some Notes</a></dt><dd><dl><dt><a href="#id2880508">Implement TRANSPARENT functions</a></dt><dt><a href="#id2880533">Implement OPAQUE functions</a></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879326"></a>The Samba (Posix) VFS layer</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879332"></a>The general interface</h3></div></div><div></div></div><p>
Each VFS operation has a vfs_op_type, a function pointer and a handle pointer in the
struct vfs_ops and tree macros to make it easier to call the operations.
(Take a look at <tt class="filename">include/vfs.h</tt> and <tt class="filename">include/vfs_macros.h</tt>.)
@@ -2126,7 +2128,7 @@ DO NOT ACCESS conn-&gt;vfs.ops.* directly !!!
(tofd), (fsp), (fromfd), (header), (offset), (count)))
...
-</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879439"></a>Possible VFS operation layers</h3></div></div><div></div></div><p>
+</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879448"></a>Possible VFS operation layers</h3></div></div><div></div></div><p>
These values are used by the VFS subsystem when building the conn-&gt;vfs
and conn-&gt;vfs_opaque structs for a connection with multiple VFS modules.
Internally, Samba differentiates only opaque and transparent layers at this process.
@@ -2155,7 +2157,7 @@ typedef enum _vfs_op_layer {
SMB_VFS_LAYER_SCANNER /* - Checks data and possibly initiates additional */
/* file activity like logging to files _inside_ samba VFS */
} vfs_op_layer;
-</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879511"></a>The Interaction between the Samba VFS subsystem and the modules</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879518"></a>Initialization and registration</h3></div></div><div></div></div><p>
+</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879520"></a>The Interaction between the Samba VFS subsystem and the modules</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879528"></a>Initialization and registration</h3></div></div><div></div></div><p>
As each Samba module a VFS module should have a
</p><pre class="programlisting">NTSTATUS vfs_example_init(void);</pre><p> function if it's staticly linked to samba or
</p><pre class="programlisting">NTSTATUS init_module(void);</pre><p> function if it's a shared module.
@@ -2195,7 +2197,7 @@ NTSTATUS init_module(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, &quot;example&quot;, example_op_tuples);
}
-</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879711"></a>How the Modules handle per connection data</h3></div></div><div></div></div><p>Each VFS function has as first parameter a pointer to the modules vfs_handle_struct.
+</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879720"></a>How the Modules handle per connection data</h3></div></div><div></div></div><p>Each VFS function has as first parameter a pointer to the modules vfs_handle_struct.
</p><pre class="programlisting">
typedef struct vfs_handle_struct {
struct vfs_handle_struct *next, *prev;
@@ -2296,7 +2298,7 @@ you can set this function pointer to NULL.</p></dd></dl></div><p>Some useful MAC
(handle)-&gt;vfs_next.handles.sendfile,\
(tofd), (fsp), (fromfd), (header), (offset), (count)))
...
-</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879954"></a>Upgrading to the New VFS Interface</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879961"></a>Upgrading from 2.2.* and 3.0aplha modules</h3></div></div><div></div></div><div class="orderedlist"><ol type="1"><li><p>
+</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2879963"></a>Upgrading to the New VFS Interface</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2879970"></a>Upgrading from 2.2.* and 3.0aplha modules</h3></div></div><div></div></div><div class="orderedlist"><ol type="1"><li><p>
Add &quot;vfs_handle_struct *handle, &quot; as first parameter to all vfs operation functions.
e.g. example_connect(connection_struct *conn, const char *service, const char *user);
-&gt; example_connect(vfs_handle_struct *handle, connection_struct *conn, const char *service, const char *user);
@@ -2559,7 +2561,7 @@ for your module.
</p></li><li><p>
Compiling &amp; Testing...
</p><table class="simplelist" border="0" summary="Simple list"><tr><td><b class="userinput"><tt>./configure <tt class="option">--enable-developer</tt></tt></b> ...</td></tr><tr><td><b class="userinput"><tt>make</tt></b></td></tr><tr><td>Try to fix all compiler warnings</td></tr><tr><td><b class="userinput"><tt>make</tt></b></td></tr><tr><td>Testing, Testing, Testing ...</td></tr></table><p>
-</p></li></ol></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2880504"></a>Some Notes</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2880511"></a>Implement TRANSPARENT functions</h3></div></div><div></div></div><p>
+</p></li></ol></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2880501"></a>Some Notes</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2880508"></a>Implement TRANSPARENT functions</h3></div></div><div></div></div><p>
Avoid writing functions like this:
</p><pre class="programlisting">
@@ -2570,7 +2572,7 @@ static int example_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
</pre><p>
Overload only the functions you really need to!
-</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2880536"></a>Implement OPAQUE functions</h3></div></div><div></div></div><p>
+</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2880533"></a>Implement OPAQUE functions</h3></div></div><div></div></div><p>
If you want to just implement a better version of a
default samba opaque function
(e.g. like a disk_free() function for a special filesystem)
@@ -2590,12 +2592,12 @@ static int example_rename(vfs_handle_struct *handle, connection_struct *conn,
errno = ENOSYS;
return -1;
}
-</pre></div></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Packaging"></a>Chapter 18. Notes to packagers</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="surname">Vernooij</span></h3></div></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2880603">Versioning</a></dt><dt><a href="#id2880638">Modules</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2880603"></a>Versioning</h2></div></div><div></div></div><p>Please, please update the version number in
+</pre></div></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Packaging"></a>Chapter 18. Notes to packagers</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="surname">Vernooij</span></h3></div></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2880600">Versioning</a></dt><dt><a href="#id2880635">Modules</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2880600"></a>Versioning</h2></div></div><div></div></div><p>Please, please update the version number in
<tt class="filename">source/include/version.h</tt> to include the versioning of your package. This makes it easier to distinguish standard samba builds
from custom-build samba builds (distributions often patch packages). For
example, a good version would be: </p><pre class="programlisting">
Version 2.999+3.0.alpha21-5 for Debian
-</pre></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2880638"></a>Modules</h2></div></div><div></div></div><p>Samba now has support for building parts of samba as plugins. This
+</pre></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2880635"></a>Modules</h2></div></div><div></div></div><p>Samba now has support for building parts of samba as plugins. This
makes it possible to, for example, put ldap or mysql support in a seperate
package, thus making it possible to have a normal samba package not
depending on ldap or mysql. To build as much parts of samba