diff options
Diffstat (limited to 'docs/htmldocs/Samba3-Developers-Guide')
23 files changed, 287 insertions, 287 deletions
diff --git a/docs/htmldocs/Samba3-Developers-Guide/CodingSuggestions.html b/docs/htmldocs/Samba3-Developers-Guide/CodingSuggestions.html index f4c5744e3a..44a01f28ba 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/CodingSuggestions.html +++ b/docs/htmldocs/Samba3-Developers-Guide/CodingSuggestions.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 6. Coding Suggestions</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="internals.html" title="Chapter 5. Samba Internals"><link rel="next" href="contributing.html" title="Chapter 7. Contributing code"></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 6. Coding Suggestions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="contributing.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 6. Coding Suggestions"><div class="titlepage"><div><div><h2 class="title"><a name="CodingSuggestions"></a>Chapter 6. Coding Suggestions</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Steve</span> <span class="surname">French</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Simo</span> <span class="surname">Sorce</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Bartlett</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Tim</span> <span class="surname">Potter</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Martin</span> <span class="surname">Pool</span></h3></div></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 6. Coding Suggestions</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="internals.html" title="Chapter 5. Samba Internals"><link rel="next" href="contributing.html" title="Chapter 7. Contributing code"></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 6. Coding Suggestions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="contributing.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="CodingSuggestions"></a>Chapter 6. Coding Suggestions</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Steve</span> <span class="surname">French</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Simo</span> <span class="surname">Sorce</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Bartlett</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Tim</span> <span class="surname">Potter</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Martin</span> <span class="surname">Pool</span></h3></div></div></div></div><p> So you want to add code to Samba ... </p><p> One of the daunting tasks facing a programmer attempting to write code for @@ -39,91 +39,91 @@ tries to support, not all of which follow the SNIA CIFS Technical Reference Standard) perfectly. </p><p> Here are some other suggestions: -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="orderedlist"><ol type="1"><li><p> use d_printf instead of printf for display text reason: enable auto-substitution of translated language text -</p></li><li class="listitem"><p> +</p></li><li><p> use SAFE_FREE instead of free reason: reduce traps due to null pointers -</p></li><li class="listitem"><p> +</p></li><li><p> don't use bzero use memset, or ZERO_STRUCT and ZERO_STRUCTP macros reason: not POSIX -</p></li><li class="listitem"><p> +</p></li><li><p> don't use strcpy and strlen (use safe_* equivalents) reason: to avoid traps due to buffer overruns -</p></li><li class="listitem"><p> +</p></li><li><p> don't use getopt_long, use popt functions instead reason: portability -</p></li><li class="listitem"><p> +</p></li><li><p> explicitly add const qualifiers on parm passing in functions where parm is input only (somewhat controversial but const can be #defined away) -</p></li><li class="listitem"><p> +</p></li><li><p> when passing a va_list as an arg, or assigning one to another please use the VA_COPY() macro reason: on some platforms, va_list is a struct that must be initialized in each function...can SEGV if you don't. -</p></li><li class="listitem"><p> +</p></li><li><p> discourage use of threads reason: portability (also see architecture.doc) -</p></li><li class="listitem"><p> +</p></li><li><p> don't explicitly include new header files in C files - new h files should be included by adding them once to includes.h reason: consistency -</p></li><li class="listitem"><p> +</p></li><li><p> don't explicitly extern functions (they are autogenerated by "make proto" into proto.h) reason: consistency -</p></li><li class="listitem"><p> +</p></li><li><p> use endian safe macros when unpacking SMBs (see byteorder.h and internals.doc) reason: not everyone uses Intel -</p></li><li class="listitem"><p> +</p></li><li><p> Note Unicode implications of charset handling (see internals.doc). See pull_* and push_* and convert_string functions. reason: Internationalization -</p></li><li class="listitem"><p> +</p></li><li><p> Don't assume English only reason: See above -</p></li><li class="listitem"><p> +</p></li><li><p> Try to avoid using in/out parameters (functions that return data which overwrites input parameters) reason: Can cause stability problems -</p></li><li class="listitem"><p> +</p></li><li><p> Ensure copyright notices are correct, don't append Tridge's name to code that he didn't write. If you did not write the code, make sure that it can coexist with the rest of the Samba GPLed code. -</p></li><li class="listitem"><p> +</p></li><li><p> Consider usage of DATA_BLOBs for length specified byte-data. reason: stability -</p></li><li class="listitem"><p> +</p></li><li><p> Take advantage of tdbs for database like function reason: consistency -</p></li><li class="listitem"><p> +</p></li><li><p> Don't access the SAM_ACCOUNT structure directly, they should be accessed via pdb_get...() and pdb_set...() functions. reason: stability, consistency -</p></li><li class="listitem"><p> +</p></li><li><p> Don't check a password directly against the passdb, always use the check_password() interface. reason: long term pluggability -</p></li><li class="listitem"><p> +</p></li><li><p> Try to use asprintf rather than pstrings and fstrings where possible -</p></li><li class="listitem"><p> +</p></li><li><p> Use normal C comments / * instead of C++ comments // like this. Although the C++ comment format is part of the C99 standard, some older vendor C compilers do not accept it. -</p></li><li class="listitem"><p> +</p></li><li><p> Try to write documentation for API functions and structures explaining the point of the code, the way it should be used, and any special conditions or results. Mark these with a double-star comment start / ** so that they can be picked up by Doxygen, as in this file. -</p></li><li class="listitem"><p> +</p></li><li><p> Keep the scope narrow. This means making functions/variables static whenever possible. We don't want our namespace polluted. Each module should have a minimal number of externally visible functions or variables. -</p></li><li class="listitem"><p> +</p></li><li><p> Use function pointers to keep knowledge about particular pieces of code isolated in one place. We don't want a particular piece of functionality to be spread out across lots of places - that makes @@ -131,7 +131,7 @@ Here are some other suggestions: and use tables containing function pointers to implement specific functionality. This is particularly important for command interpreters. -</p></li><li class="listitem"><p> +</p></li><li><p> Think carefully about what it will be like for someone else to add to and maintain your code. If it would be hard for someone else to maintain then do it another way. diff --git a/docs/htmldocs/Samba3-Developers-Guide/Packaging.html b/docs/htmldocs/Samba3-Developers-Guide/Packaging.html index 847a846ad4..15306be73a 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/Packaging.html +++ b/docs/htmldocs/Samba3-Developers-Guide/Packaging.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 16. Notes to packagers</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="pt05.html" title="Part V. Appendices"><link rel="prev" href="pt05.html" title="Part V. Appendices"></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 16. Notes to packagers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt05.html">Prev</a> </td><th width="60%" align="center">Part V. Appendices</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter" title="Chapter 16. Notes to packagers"><div class="titlepage"><div><div><h2 class="title"><a name="Packaging"></a>Chapter 16. 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 class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="Packaging.html#id2568047">Versioning</a></span></dt><dt><span class="sect1"><a href="Packaging.html#id2568080">Modules</a></span></dt></dl></div><div class="sect1" title="Versioning"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2568047"></a>Versioning</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 16. Notes to packagers</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="pt05.html" title="Part V. Appendices"><link rel="prev" href="pt05.html" title="Part V. Appendices"></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 16. Notes to packagers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt05.html">Prev</a> </td><th width="60%" align="center">Part V. Appendices</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Packaging"></a>Chapter 16. 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 class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="Packaging.html#id2561975">Versioning</a></span></dt><dt><span class="sect1"><a href="Packaging.html#id2562008">Modules</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2561975"></a>Versioning</h2></div></div></div><p> Please, please set the vendor version suffix and number in <code class="filename">source/VERSION</code> and call <code class="filename">source/script/mkvesion.sh</code> to include the versioning of your package. There is also the possibility to set a function to create the vendor version. This makes it easier to distinguish @@ -6,7 +6,7 @@ standard samba builds from custom-build samba builds (distributions often patch a good version would be: </p><pre class="programlisting"> Version 2.999+3.0.alpha21-5 for Debian -</pre></div><div class="sect1" title="Modules"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2568080"></a>Modules</h2></div></div></div><p> +</pre></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562008"></a>Modules</h2></div></div></div><p> Samba3 has support for building parts of samba as plugins. This makes it possible to, for example, put ldap or mysql support in a separate package, thus making it possible to have a normal samba package not depending on ldap or mysql. To build as much parts of samba as a plugin, run: diff --git a/docs/htmldocs/Samba3-Developers-Guide/architecture.html b/docs/htmldocs/Samba3-Developers-Guide/architecture.html index b46a9def6b..94ffad66ed 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/architecture.html +++ b/docs/htmldocs/Samba3-Developers-Guide/architecture.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 3. Samba Architecture</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="pt02.html" title="Part II. Samba Basics"><link rel="next" href="debug.html" title="Chapter 4. The samba DEBUG system"></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 3. Samba Architecture</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt02.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 3. Samba Architecture"><div class="titlepage"><div><div><h2 class="title"><a name="architecture"></a>Chapter 3. Samba Architecture</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Dan</span> <span class="surname">Shearer</span></h3></div></div><div><p class="pubdate"> November 1997</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="architecture.html#id2562765">Introduction</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562808">Multithreading and Samba</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562839">Threading smbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562900">Threading nmbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562945">nbmd Design</a></span></dt></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562765"></a>Introduction</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 3. Samba Architecture</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="pt02.html" title="Part II. Samba Basics"><link rel="next" href="debug.html" title="Chapter 4. The samba DEBUG system"></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 3. Samba Architecture</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt02.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="architecture"></a>Chapter 3. Samba Architecture</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Dan</span> <span class="surname">Shearer</span></h3></div></div><div><p class="pubdate"> November 1997</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="architecture.html#id2556692">Introduction</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556735">Multithreading and Samba</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556767">Threading smbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556828">Threading nmbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556873">nbmd Design</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556692"></a>Introduction</h2></div></div></div><p> This document gives a general overview of how Samba works internally. The Samba Team has tried to come up with a model which is the best possible compromise between elegance, portability, security @@ -6,10 +6,10 @@ and the constraints imposed by the very messy SMB and CIFS protocol. </p><p> It also tries to answer some of the frequently asked questions such as: -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="orderedlist"><ol type="1"><li><p> Is Samba secure when running on Unix? The xyz platform? What about the root priveliges issue? -</p></li><li class="listitem"><p>Pros and cons of multithreading in various parts of Samba</p></li><li class="listitem"><p>Why not have a separate process for name resolution, WINS, and browsing?</p></li></ol></div></div><div class="sect1" title="Multithreading and Samba"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562808"></a>Multithreading and Samba</h2></div></div></div><p> +</p></li><li><p>Pros and cons of multithreading in various parts of Samba</p></li><li><p>Why not have a separate process for name resolution, WINS, and browsing?</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556735"></a>Multithreading and Samba</h2></div></div></div><p> People sometimes tout threads as a uniformly good thing. They are very nice in their place but are quite inappropriate for smbd. nmbd is another matter, and multi-threading it would be very nice. @@ -26,32 +26,32 @@ smbd multi-threaded. Multi-threading would actually make Samba much slower, less scalable, less portable and much less robust. The fact that we use a separate process for each connection is one of Samba's biggest advantages. -</p></div><div class="sect1" title="Threading smbd"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562839"></a>Threading smbd</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556767"></a>Threading smbd</h2></div></div></div><p> A few problems that would arise from a threaded smbd are: -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="orderedlist"><ol type="1"><li><p> It's not only to create threads instead of processes, but you must care about all variables if they have to be thread specific (currently they would be global). -</p></li><li class="listitem"><p> +</p></li><li><p> if one thread dies (eg. a seg fault) then all threads die. We can immediately throw robustness out the window. -</p></li><li class="listitem"><p> +</p></li><li><p> many of the system calls we make are blocking. Non-blocking equivalents of many calls are either not available or are awkward (and slow) to use. So while we block in one thread all clients are waiting. Imagine if one share is a slow NFS filesystem and the others are fast, we will end up slowing all clients to the speed of NFS. -</p></li><li class="listitem"><p> +</p></li><li><p> you can't run as a different uid in different threads. This means we would have to switch uid/gid on _every_ SMB packet. It would be horrendously slow. -</p></li><li class="listitem"><p> +</p></li><li><p> the per process file descriptor limit would mean that we could only support a limited number of clients. -</p></li><li class="listitem"><p> +</p></li><li><p> we couldn't use the system locking calls as the locking context of fcntl() is a process, not a thread. -</p></li></ol></div></div><div class="sect1" title="Threading nmbd"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562900"></a>Threading nmbd</h2></div></div></div><p> +</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556828"></a>Threading nmbd</h2></div></div></div><p> This would be ideal, but gets sunk by portability requirements. </p><p> Andrew tried to write a test threads library for nmbd that used only @@ -78,7 +78,7 @@ packet that arrives. Having a pool of processes is possible but is nasty to program cleanly due to the enormous amount of shared data (in complex structures) between the processes. We can't rely on each platform having a shared memory system. -</p></div><div class="sect1" title="nbmd Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562945"></a>nbmd Design</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556873"></a>nbmd Design</h2></div></div></div><p> Originally Andrew used recursion to simulate a multi-threaded environment, which use the stack enormously and made for really confusing debugging sessions. Luke Leighton rewrote it to use a diff --git a/docs/htmldocs/Samba3-Developers-Guide/contributing.html b/docs/htmldocs/Samba3-Developers-Guide/contributing.html index c94cceecdd..696d7cd0c0 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/contributing.html +++ b/docs/htmldocs/Samba3-Developers-Guide/contributing.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 7. Contributing code</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="CodingSuggestions.html" title="Chapter 6. Coding Suggestions"><link rel="next" href="modules.html" title="Chapter 8. Modules"></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 7. Contributing code</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="CodingSuggestions.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="modules.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 7. Contributing code"><div class="titlepage"><div><div><h2 class="title"><a name="contributing"></a>Chapter 7. Contributing code</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div></div></div><p>Here are a few tips and notes that might be useful if you are +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 7. Contributing code</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="CodingSuggestions.html" title="Chapter 6. Coding Suggestions"><link rel="next" href="modules.html" title="Chapter 8. Modules"></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 7. Contributing code</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="CodingSuggestions.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="modules.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="contributing"></a>Chapter 7. Contributing code</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="orgname">The Samba Team</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div></div></div><p>Here are a few tips and notes that might be useful if you are interested in modifying samba source code and getting it into samba's main branch.</p><div class="variablelist"><dl><dt><span class="term">Retrieving the source</span></dt><dd><p>In order to contribute code to samba, make sure you have the latest source. Retrieving the samba source code from CVS is @@ -16,14 +16,14 @@ </p><p>If you are modifying a copy of samba you retrieved from CVS, you can easily generate a diff file of these changes by running <strong class="userinput"><code>cvs diff -u</code></strong>.</p></dd><dt><span class="term">Points of attention when modifying samba source code</span></dt><dd><p> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Don't simply copy code from other places and modify it until it + </p><div class="itemizedlist"><ul type="disc"><li><p>Don't simply copy code from other places and modify it until it works. Code needs to be clean and logical. Duplicate - code is to be avoided.</p></li><li class="listitem"><p>Test your patch. It might take a while before one of us looks + code is to be avoided.</p></li><li><p>Test your patch. It might take a while before one of us looks at your patch so it will take longer before your patch when your patch - needs to go thru the review cycle again.</p></li><li class="listitem"><p>Don't put separate patches in one large diff file. This makes + needs to go thru the review cycle again.</p></li><li><p>Don't put separate patches in one large diff file. This makes it harder to read, understand and test the patch. You might also risk not getting a good patch committed because you mixed it - with one that had issues. </p></li><li class="listitem"><p>Make sure your patch complies to the samba coding style as + with one that had issues. </p></li><li><p>Make sure your patch complies to the samba coding style as suggested in the coding-suggestions chapter. </p></li></ul></div><p> </p></dd><dt><span class="term">Sending in bugfixes</span></dt><dd><p>Bugfixes to bugs in samba should be submitted to samba's <a class="ulink" href="https://bugzilla.samba.org/" target="_top">bugzilla system</a>, diff --git a/docs/htmldocs/Samba3-Developers-Guide/debug.html b/docs/htmldocs/Samba3-Developers-Guide/debug.html index a85ab94e5e..d00949d458 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/debug.html +++ b/docs/htmldocs/Samba3-Developers-Guide/debug.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 4. The samba DEBUG system</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="architecture.html" title="Chapter 3. Samba Architecture"><link rel="next" href="internals.html" title="Chapter 5. Samba Internals"></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 4. The samba DEBUG system</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="architecture.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 4. The samba DEBUG system"><div class="titlepage"><div><div><h2 class="title"><a name="debug"></a>Chapter 4. The samba DEBUG system</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Chris</span> <span class="surname">Hertel</span></h3></div></div><div><p class="pubdate">July 1998</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="debug.html#id2563001">New Output Syntax</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563111">The DEBUG() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563216">The DEBUGADD() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563252">The DEBUGLVL() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563343">New Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#id2563348">dbgtext()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2563364">dbghdr()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2563383">format_debug_text()</a></span></dt></dl></dd></dl></div><div class="sect1" title="New Output Syntax"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563001"></a>New Output Syntax</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 4. The samba DEBUG system</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="architecture.html" title="Chapter 3. Samba Architecture"><link rel="next" href="internals.html" title="Chapter 5. Samba Internals"></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 4. The samba DEBUG system</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="architecture.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="debug"></a>Chapter 4. The samba DEBUG system</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Chris</span> <span class="surname">Hertel</span></h3></div></div><div><p class="pubdate">July 1998</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="debug.html#id2556929">New Output Syntax</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557038">The DEBUG() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557144">The DEBUGADD() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557180">The DEBUGLVL() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557271">New Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#id2557276">dbgtext()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2557292">dbghdr()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2557311">format_debug_text()</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="id2556929"></a>New Output Syntax</h2></div></div></div><p> The syntax of a debugging log file is represented as: </p><pre class="programlisting"> >debugfile< :== { >debugmsg< } @@ -25,12 +25,12 @@ FUNCTION is the function from which the debug message was generated. </p><p> LINE is the line number of the debug statement that generated the message. -</p><p>Basically, what that all means is:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><p>Basically, what that all means is:</p><div class="orderedlist"><ol type="1"><li><p> A debugging log file is made up of debug messages. -</p></li><li class="listitem"><p> +</p></li><li><p> Each debug message is made up of a header and text. The header is separated from the text by a newline. -</p></li><li class="listitem"><p> +</p></li><li><p> The header begins with the timestamp and debug level of the message enclosed in brackets. The filename, function, and line number at which the message was generated follow. The filename is @@ -38,7 +38,7 @@ terminated by a colon, and the function name is terminated by the parenthesis which contain the line number. Depending upon the compiler, the function name may be missing (it is generated by the __FUNCTION__ macro, which is not universally implemented, dangit). -</p></li><li class="listitem"><p> +</p></li><li><p> The message text is made up of zero or more lines, each terminated by a newline. </p></li></ol></div><p>Here's some example output:</p><pre class="programlisting"> @@ -51,7 +51,7 @@ by a newline. Note that in the above example the function names are not listed on the header line. That's because the example above was generated on an SGI Indy, and the SGI compiler doesn't support the __FUNCTION__ macro. -</p></div><div class="sect1" title="The DEBUG() Macro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563111"></a>The DEBUG() Macro</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557038"></a>The DEBUG() Macro</h2></div></div></div><p> Use of the DEBUG() macro is unchanged. DEBUG() takes two parameters. The first is the message level, the second is the body of a function call to the Debug1() function. @@ -102,7 +102,7 @@ would look like this: [1998/07/30 16:00:51, 0] file.c:function(261) . </pre><p>Which isn't much use. The format buffer kludge fixes this problem. -</p></div><div class="sect1" title="The DEBUGADD() Macro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563216"></a>The DEBUGADD() Macro</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557144"></a>The DEBUGADD() Macro</h2></div></div></div><p> In addition to the kludgey solution to the broken line problem described above, there is a clean solution. The DEBUGADD() macro never generates a header. It will append new text to the current debug @@ -116,7 +116,7 @@ DEBUGADD() macro is the same as that of the DEBUG() macro. This is the first line. This is the second line. This is the third line. -</pre></div><div class="sect1" title="The DEBUGLVL() Macro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563252"></a>The DEBUGLVL() Macro</h2></div></div></div><p> +</pre></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557180"></a>The DEBUGLVL() Macro</h2></div></div></div><p> One of the problems with the DEBUG() macro was that DEBUG() lines tended to get a bit long. Consider this example from nmbd_sendannounce.c: @@ -143,15 +143,15 @@ the global DEBUGLEVEL value, so: dbgtext( "on subnet %s ", subrec->subnet_name ); dbgtext( "for workgroup %s\n", work->work_group ); } -</pre><p>(The dbgtext() function is explained below.)</p><p>There are a few advantages to this scheme:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</pre><p>(The dbgtext() function is explained below.)</p><p>There are a few advantages to this scheme:</p><div class="orderedlist"><ol type="1"><li><p> The test is performed only once. -</p></li><li class="listitem"><p> +</p></li><li><p> You can allocate variables off of the stack that will only be used within the DEBUGLVL() block. -</p></li><li class="listitem"><p> +</p></li><li><p> Processing that is only relevant to debug output can be contained within the DEBUGLVL() block. -</p></li></ol></div></div><div class="sect1" title="New Functions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563343"></a>New Functions</h2></div></div></div><div class="sect2" title="dbgtext()"><div class="titlepage"><div><div><h3 class="title"><a name="id2563348"></a>dbgtext()</h3></div></div></div><p> +</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557271"></a>New Functions</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557276"></a>dbgtext()</h3></div></div></div><p> This function prints debug message text to the debug file (and possibly to syslog) via the format buffer. The function uses a variable argument list just like printf() or Debug1(). The @@ -160,7 +160,7 @@ and then passed to format_debug_text(). If you use DEBUGLVL() you will probably print the body of the message using dbgtext(). -</p></div><div class="sect2" title="dbghdr()"><div class="titlepage"><div><div><h3 class="title"><a name="id2563364"></a>dbghdr()</h3></div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557292"></a>dbghdr()</h3></div></div></div><p> This is the function that writes a debug message header. Headers are not processed via the format buffer. Also note that if the format buffer is not empty, a call to dbghdr() will not @@ -168,7 +168,7 @@ produce any output. See the comments in dbghdr() for more info. </p><p> It is not likely that this function will be called directly. It is used by DEBUG() and DEBUGADD(). -</p></div><div class="sect2" title="format_debug_text()"><div class="titlepage"><div><div><h3 class="title"><a name="id2563383"></a>format_debug_text()</h3></div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557311"></a>format_debug_text()</h3></div></div></div><p> This is a static function in debug.c. It stores the output text for the body of the message in a buffer until it encounters a newline. When the newline character is found, the buffer is diff --git a/docs/htmldocs/Samba3-Developers-Guide/devprinting.html b/docs/htmldocs/Samba3-Developers-Guide/devprinting.html index 6a1e5710db..b19da0e6d7 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/devprinting.html +++ b/docs/htmldocs/Samba3-Developers-Guide/devprinting.html @@ -1,27 +1,27 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 15. Samba Printing Internals</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="pt04.html" title="Part IV. Debugging and tracing"><link rel="prev" href="tracing.html" title="Chapter 14. Tracing samba system calls"><link rel="next" href="pt05.html" title="Part V. Appendices"></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 15. Samba Printing Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="tracing.html">Prev</a> </td><th width="60%" align="center">Part IV. Debugging and tracing</th><td width="20%" align="right"> <a accesskey="n" href="pt05.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 15. Samba Printing Internals"><div class="titlepage"><div><div><h2 class="title"><a name="devprinting"></a>Chapter 15. Samba Printing Internals</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Gerald</span> <span class="surname">Carter</span></h3></div></div><div><p class="pubdate">October 2002</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="devprinting.html#id2567455">Abstract</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567467"> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 15. Samba Printing Internals</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="pt04.html" title="Part IV. Debugging and tracing"><link rel="prev" href="tracing.html" title="Chapter 14. Tracing samba system calls"><link rel="next" href="pt05.html" title="Part V. Appendices"></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 15. Samba Printing Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="tracing.html">Prev</a> </td><th width="60%" align="center">Part IV. Debugging and tracing</th><td width="20%" align="right"> <a accesskey="n" href="pt05.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="devprinting"></a>Chapter 15. Samba Printing Internals</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Gerald</span> <span class="surname">Carter</span></h3></div></div><div><p class="pubdate">October 2002</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="devprinting.html#id2561382">Abstract</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561395"> Printing Interface to Various Back ends -</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567544"> +</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561471"> Print Queue TDB's -</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567717"> +</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561645"> ChangeID and Client Caching of Printer Information -</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567728"> +</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561655"> Windows NT/2K Printer Change Notify -</a></span></dt></dl></div><div class="sect1" title="Abstract"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2567455"></a>Abstract</h2></div></div></div><p> +</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2561382"></a>Abstract</h2></div></div></div><p> The purpose of this document is to provide some insight into Samba's printing functionality and also to describe the semantics of certain features of Windows client printing. -</p></div><div class="sect1" title="Printing Interface to Various Back ends"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2567467"></a> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2561395"></a> Printing Interface to Various Back ends </h2></div></div></div><p> Samba uses a table of function pointers to seven functions. The function prototypes are defined in the <code class="varname">printif</code> structure declared in <code class="filename">printing.h</code>. -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>retrieve the contents of a print queue</p></li><li class="listitem"><p>pause the print queue</p></li><li class="listitem"><p>resume a paused print queue</p></li><li class="listitem"><p>delete a job from the queue</p></li><li class="listitem"><p>pause a job in the print queue</p></li><li class="listitem"><p>result a paused print job in the queue</p></li><li class="listitem"><p>submit a job to the print queue</p></li></ul></div><p> +</p><div class="itemizedlist"><ul type="disc"><li><p>retrieve the contents of a print queue</p></li><li><p>pause the print queue</p></li><li><p>resume a paused print queue</p></li><li><p>delete a job from the queue</p></li><li><p>pause a job in the print queue</p></li><li><p>result a paused print job in the queue</p></li><li><p>submit a job to the print queue</p></li></ul></div><p> Currently there are only two printing back end implementations defined. -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>a generic set of functions for working with standard UNIX - printing subsystems</p></li><li class="listitem"><p>a set of CUPS specific functions (this is only enabled if - the CUPS libraries were located at compile time).</p></li></ul></div></div><div class="sect1" title="Print Queue TDB's"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2567544"></a> +</p><div class="itemizedlist"><ul type="disc"><li><p>a generic set of functions for working with standard UNIX + printing subsystems</p></li><li><p>a set of CUPS specific functions (this is only enabled if + the CUPS libraries were located at compile time).</p></li></ul></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2561471"></a> Print Queue TDB's </h2></div></div></div><p> Samba provides periodic caching of the output from the "lpq command" @@ -77,12 +77,12 @@ for old lanman clients. </p><p> When updating a print queue, smbd will perform the following steps ( refer to <code class="filename">print.c:print_queue_update()</code> ): -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Check to see if another smbd is currently in +</p><div class="orderedlist"><ol type="1"><li><p>Check to see if another smbd is currently in the process of updating the queue contents by checking the pid stored in <code class="constant">LOCK/<em class="replaceable"><code>printer_name</code></em></code>. - If so, then do not update the TDB.</p></li><li class="listitem"><p>Lock the mutex entry in the TDB and store our own pid. - Check that this succeeded, else fail.</p></li><li class="listitem"><p>Store the updated time stamp for the new cache - listing</p></li><li class="listitem"><p>Retrieve the queue listing via "lpq command"</p></li><li class="listitem"><pre class="programlisting"> + If so, then do not update the TDB.</p></li><li><p>Lock the mutex entry in the TDB and store our own pid. + Check that this succeeded, else fail.</p></li><li><p>Store the updated time stamp for the new cache + listing</p></li><li><p>Retrieve the queue listing via "lpq command"</p></li><li><pre class="programlisting"> foreach job in the queue { if the job is a UNIX job, create a new entry; @@ -94,8 +94,8 @@ steps ( refer to <code class="filename">print.c:print_queue_update()</code> ): else update the job status only } - }</pre></li><li class="listitem"><p>Delete any jobs in the TDB that are not - in the in the lpq listing</p></li><li class="listitem"><p>Store the print queue status in the TDB</p></li><li class="listitem"><p>update the cache time stamp again</p></li></ol></div><p> + }</pre></li><li><p>Delete any jobs in the TDB that are not + in the in the lpq listing</p></li><li><p>Store the print queue status in the TDB</p></li><li><p>update the cache time stamp again</p></li></ol></div><p> Note that it is the contents of this TDB that is returned to Windows clients and not the actual listing from the "lpq command". </p><p> @@ -110,11 +110,11 @@ and the job has the printer's device mode associated with it by default. Only non-default Device Mode are stored with print jobs in the print queue TDB. Otherwise, the Device Mode is obtained from the printer object when the client issues a GetJob(level == 2) request. -</p></div><div class="sect1" title="ChangeID and Client Caching of Printer Information"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2567717"></a> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2561645"></a> ChangeID and Client Caching of Printer Information </h2></div></div></div><p> [To be filled in later] -</p></div><div class="sect1" title="Windows NT/2K Printer Change Notify"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2567728"></a> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2561655"></a> Windows NT/2K Printer Change Notify </h2></div></div></div><p> When working with Windows NT+ clients, it is possible for a @@ -127,10 +127,10 @@ entirely orthogonal to cache updates based on a new ChangeID for a printer object. </p><p> The basic set of RPC's used to implement change notification are -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>RemoteFindFirstPrinterChangeNotifyEx ( RFFPCN )</p></li><li class="listitem"><p>RemoteFindNextPrinterChangeNotifyEx ( RFNPCN )</p></li><li class="listitem"><p>FindClosePrinterChangeNotify( FCPCN )</p></li><li class="listitem"><p>ReplyOpenPrinter</p></li><li class="listitem"><p>ReplyClosePrinter</p></li><li class="listitem"><p>RouteRefreshPrinterChangeNotify ( RRPCN )</p></li></ul></div><p> +</p><div class="itemizedlist"><ul type="disc"><li><p>RemoteFindFirstPrinterChangeNotifyEx ( RFFPCN )</p></li><li><p>RemoteFindNextPrinterChangeNotifyEx ( RFNPCN )</p></li><li><p>FindClosePrinterChangeNotify( FCPCN )</p></li><li><p>ReplyOpenPrinter</p></li><li><p>ReplyClosePrinter</p></li><li><p>RouteRefreshPrinterChangeNotify ( RRPCN )</p></li></ul></div><p> One additional RPC is available to a server, but is never used by the Windows spooler service: -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>RouteReplyPrinter()</p></li></ul></div><p> +</p><div class="itemizedlist"><ul type="disc"><li><p>RouteReplyPrinter()</p></li></ul></div><p> The opnum for all of these RPC's are defined in include/rpc_spoolss.h </p><p> Windows NT print servers use a bizarre method of sending print @@ -172,7 +172,7 @@ S: The server closes the internal change notification handle </pre><p> The current list of notification events supported by Samba can be found by examining the internal tables in srv_spoolss_nt.c -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>printer_notify_table[]</p></li><li class="listitem"><p>job_notify_table[]</p></li></ul></div><p> +</p><div class="itemizedlist"><ul type="disc"><li><p>printer_notify_table[]</p></li><li><p>job_notify_table[]</p></li></ul></div><p> When an event occurs that could be monitored, smbd sends a message to itself about the change. The list of events to be transmitted are queued by the smbd process sending the message to prevent an @@ -192,24 +192,24 @@ printer handle obtained via a ReplyOpenPrinter(). </p><p> The actual change notification is performed using the RRPCN request RPC. This packet contains -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>the printer handle registered with the -client's spooler on which the change occurred</p></li><li class="listitem"><p>The change_low value which was sent as part -of the last RFNPCN request from the client</p></li><li class="listitem"><p>The SPOOL_NOTIFY_INFO container with the event +</p><div class="itemizedlist"><ul type="disc"><li><p>the printer handle registered with the +client's spooler on which the change occurred</p></li><li><p>The change_low value which was sent as part +of the last RFNPCN request from the client</p></li><li><p>The SPOOL_NOTIFY_INFO container with the event information</p></li></ul></div><p> A <code class="varname">SPOOL_NOTIFY_INFO</code> contains: -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>the version and flags field are predefined -and should not be changed</p></li><li class="listitem"><p>The count field is the number of entries +</p><div class="itemizedlist"><ul type="disc"><li><p>the version and flags field are predefined +and should not be changed</p></li><li><p>The count field is the number of entries in the SPOOL_NOTIFY_INFO_DATA array</p></li></ul></div><p> The <code class="varname">SPOOL_NOTIFY_INFO_DATA</code> entries contain: -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>The type defines whether or not this event -is for a printer or a print job</p></li><li class="listitem"><p>The field is the flag identifying the event</p></li><li class="listitem"><p>the notify_data union contains the new valuie of the -attribute</p></li><li class="listitem"><p>The enc_type defines the size of the structure for marshalling -and unmarshalling</p></li><li class="listitem"><p>(a) the id must be 0 for a printer event on a printer handle. +</p><div class="itemizedlist"><ul type="disc"><li><p>The type defines whether or not this event +is for a printer or a print job</p></li><li><p>The field is the flag identifying the event</p></li><li><p>the notify_data union contains the new valuie of the +attribute</p></li><li><p>The enc_type defines the size of the structure for marshalling +and unmarshalling</p></li><li><p>(a) the id must be 0 for a printer event on a printer handle. (b) the id must be the job id for an event on a printer job (c) the id must be the matching number of the printer index used in the response packet to the RFNPCN when using a print server handle for notification. Samba currently uses the snum of the printer for this which can break if the list of services -has been modified since the notification handle was registered.</p></li><li class="listitem"><p>The size is either (a) the string length in UNICODE for strings, +has been modified since the notification handle was registered.</p></li><li><p>The size is either (a) the string length in UNICODE for strings, (b) the size in bytes of the security descriptor, or (c) 0 for data values.</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="tracing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pt05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 14. Tracing samba system calls </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part V. Appendices</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/index.html b/docs/htmldocs/Samba3-Developers-Guide/index.html index 2dc4ffc800..9f11b87081 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/index.html +++ b/docs/htmldocs/Samba3-Developers-Guide/index.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>SAMBA Developers Guide</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><meta name="description" content="Last Update : Fri Oct 10 00:59:58 CEST 2003 This book is a collection of documents that might be useful for people developing samba or those interested in doing so. It's nothing more than a collection of documents written by samba developers about the internals of various parts of samba and the SMB protocol. It's still (and will always be) incomplete. The most recent version of this document can be found at http://devel.samba.org/. This documentation is distributed under the GNU General Public License (GPL) version 2. A copy of the license is included with the Samba source distribution. A copy can be found on-line at http://www.fsf.org/licenses/gpl.txt This document is incomplete and unmaintained. It is merely a collection of development-related notes."><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="next" href="pr01.html" title="Attribution"></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">SAMBA Developers Guide</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pr01.html">Next</a></td></tr></table><hr></div><div class="book" title="SAMBA Developers Guide"><div class="titlepage"><div><div><h1 class="title"><a name="Samba-Developers-Guide"></a>SAMBA Developers Guide</h1></div><div><div class="authorgroup"><div class="editor"><h4 class="editedby">Edited by</h4><h3 class="editor"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div></div><div><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>SAMBA Developers Guide</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><meta name="description" content="Last Update : Fri Oct 10 00:59:58 CEST 2003 This book is a collection of documents that might be useful for people developing samba or those interested in doing so. It's nothing more than a collection of documents written by samba developers about the internals of various parts of samba and the SMB protocol. It's still (and will always be) incomplete. The most recent version of this document can be found at http://devel.samba.org/. This documentation is distributed under the GNU General Public License (GPL) version 2. A copy of the license is included with the Samba source distribution. A copy can be found on-line at http://www.fsf.org/licenses/gpl.txt This document is incomplete and unmaintained. It is merely a collection of development-related notes."><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="next" href="pr01.html" title="Attribution"></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">SAMBA Developers Guide</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pr01.html">Next</a></td></tr></table><hr></div><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="Samba-Developers-Guide"></a>SAMBA Developers Guide</h1></div><div><div class="authorgroup"><div class="editor"><h4 class="editedby">Edited by</h4><h3 class="editor"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="orgname">The Samba Team</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div></div><div><div class="abstract"><p class="title"><b>Abstract</b></p><p> <span class="emphasis"><em>Last Update</em></span> : Fri Oct 10 00:59:58 CEST 2003 </p><p> This book is a collection of documents that might be useful for @@ -11,13 +11,13 @@ can be found at <a class="ulink" href="http://devel.samba.org/" target="_top">ht This documentation is distributed under the GNU General Public License (GPL) version 2. A copy of the license is included with the Samba source distribution. A copy can be found on-line at <a class="ulink" href="http://www.fsf.org/licenses/gpl.txt" target="_top">http://www.fsf.org/licenses/gpl.txt</a> -</p><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This document is incomplete and unmaintained. It is merely a - collection of development-related notes.</p></div></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="pr01.html">Attribution</a></span></dt><dt><span class="part"><a href="pt01.html">I. The protocol</a></span></dt><dd><dl><dt><span class="chapter"><a href="unix-smb.html">1. NetBIOS in a Unix World</a></span></dt><dd><dl><dt><span class="sect1"><a href="unix-smb.html#id2505193">Introduction</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505214">Usernames</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505546">File Ownership</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505577">Passwords</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2504910">Locking</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2504962">Deny Modes</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2504994">Trapdoor UIDs</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505015">Port numbers</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2556040">Protocol Complexity</a></span></dt></dl></dd><dt><span class="chapter"><a href="ntdomain.html">2. NT Domain RPC's</a></span></dt><dd><dl><dt><span class="sect1"><a href="ntdomain.html#id2556159">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2556325">Sources</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556351">Credits</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2556382">Notes and Structures</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2556388">Notes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556450">Enumerations</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556613">Structures</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2558885">MSRPC over Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2558896">MSRPC Pipes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2558979">Header</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559653">Tail</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559688">RPC Bind / Bind Ack</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559827">NTLSA Transact Named Pipe</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559955">LSA Open Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560051">LSA Query Info Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560132">LSA Enumerate Trusted Domains</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560202">LSA Open Secret</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560285">LSA Close</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560336">LSA Lookup SIDS</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560497">LSA Lookup Names</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2560669">NETLOGON rpc Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2560795">LSA Request Challenge</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560904">LSA Authenticate 2</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561019">LSA Server Password Set</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561111">LSA SAM Logon</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561190">LSA SAM Logoff</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2561262">\\MAILSLOT\NET\NTLOGON</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2561276">Query for PDC</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561476">SAM Logon</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2561726">SRVSVC Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2561760">Net Share Enum</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561928">Net Server Get Info</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2562018">Cryptographic side of NT Domain Authentication</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2562024">Definitions</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2562150">Protocol</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2562229">Comments</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2562270">SIDs and RIDs</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2562302">Well-known SIDs</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2562541">Well-known RIDS</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="pt02.html">II. Samba Basics</a></span></dt><dd><dl><dt><span class="chapter"><a href="architecture.html">3. Samba Architecture</a></span></dt><dd><dl><dt><span class="sect1"><a href="architecture.html#id2562765">Introduction</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562808">Multithreading and Samba</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562839">Threading smbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562900">Threading nmbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562945">nbmd Design</a></span></dt></dl></dd><dt><span class="chapter"><a href="debug.html">4. The samba DEBUG system</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug.html#id2563001">New Output Syntax</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563111">The DEBUG() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563216">The DEBUGADD() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563252">The DEBUGLVL() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563343">New Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#id2563348">dbgtext()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2563364">dbghdr()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2563383">format_debug_text()</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="internals.html">5. Samba Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="internals.html#id2563435">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2563456">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2563585">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2563596">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563607">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563618">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563628">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563641">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563652">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563664">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563675">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563686">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563698">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563709">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563720">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563732">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563743">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563755">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2563768">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2563796">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563920">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2563990">Code character table</a></span></dt></dl></dd><dt><span class="chapter"><a href="CodingSuggestions.html">6. Coding Suggestions</a></span></dt><dt><span class="chapter"><a href="contributing.html">7. Contributing code</a></span></dt><dt><span class="chapter"><a href="modules.html">8. Modules</a></span></dt><dd><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></dd></dl></dd><dt><span class="part"><a href="pt03.html">III. Samba Subsystems</a></span></dt><dd><dl><dt><span class="chapter"><a href="rpc-plugin.html">9. RPC Pluggable Modules</a></span></dt><dd><dl><dt><span class="sect1"><a href="rpc-plugin.html#id2564970">About</a></span></dt><dt><span class="sect1"><a href="rpc-plugin.html#id2564986">General Overview</a></span></dt></dl></dd><dt><span class="chapter"><a href="vfs.html">10. VFS Modules</a></span></dt><dd><dl><dt><span class="sect1"><a href="vfs.html#id2565148">The Samba (Posix) VFS layer</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2565189">The general interface</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2565500">Possible VFS operation layers</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2565561">The Interaction between the Samba VFS subsystem and the modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2565568">Initialization and registration</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2565713">How the Modules handle per connection data</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2565913">Upgrading to the New VFS Interface</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2565919">Upgrading from 2.2.* and 3.0alpha modules</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2566324">Some Notes</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2566329">Implement TRANSPARENT functions</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2566349">Implement OPAQUE functions</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parsing.html">11. The smb.conf file</a></span></dt><dd><dl><dt><span class="sect1"><a href="parsing.html#id2566406">Lexical Analysis</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2566478">Handling of Whitespace</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2566523">Handling of Line Continuation</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2566574">Line Continuation Quirks</a></span></dt></dl></dd><dt><span class="sect1"><a href="parsing.html#id2566651">Syntax</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2566709">About params.c</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="wins.html">12. Samba WINS Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="wins.html#id2566747">WINS Failover</a></span></dt></dl></dd><dt><span class="chapter"><a href="pwencrypt.html">13. LanMan and NT Password Encryption</a></span></dt><dd><dl><dt><span class="sect1"><a href="pwencrypt.html#id2566865">Introduction</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2566885">How does it work?</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2566969">The smbpasswd file</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="pt04.html">IV. Debugging and tracing</a></span></dt><dd><dl><dt><span class="chapter"><a href="tracing.html">14. Tracing samba system calls</a></span></dt><dt><span class="chapter"><a href="devprinting.html">15. Samba Printing Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="devprinting.html#id2567455">Abstract</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567467"> +</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This document is incomplete and unmaintained. It is merely a + collection of development-related notes.</p></div></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="pr01.html">Attribution</a></span></dt><dt><span class="part"><a href="pt01.html">I. The protocol</a></span></dt><dd><dl><dt><span class="chapter"><a href="unix-smb.html">1. NetBIOS in a Unix World</a></span></dt><dd><dl><dt><span class="sect1"><a href="unix-smb.html#id2499122">Introduction</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2499143">Usernames</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2499475">File Ownership</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2499506">Passwords</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498843">Locking</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498891">Deny Modes</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498923">Trapdoor UIDs</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498944">Port numbers</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498960">Protocol Complexity</a></span></dt></dl></dd><dt><span class="chapter"><a href="ntdomain.html">2. NT Domain RPC's</a></span></dt><dd><dl><dt><span class="sect1"><a href="ntdomain.html#id2550090">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2550255">Sources</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2550282">Credits</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2550313">Notes and Structures</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2550318">Notes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2550381">Enumerations</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2550543">Structures</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2552813">MSRPC over Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2552823">MSRPC Pipes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2552907">Header</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553580">Tail</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553616">RPC Bind / Bind Ack</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553755">NTLSA Transact Named Pipe</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553883">LSA Open Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553978">LSA Query Info Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554060">LSA Enumerate Trusted Domains</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554130">LSA Open Secret</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554213">LSA Close</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554264">LSA Lookup SIDS</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554425">LSA Lookup Names</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2554597">NETLOGON rpc Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2554723">LSA Request Challenge</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554832">LSA Authenticate 2</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554947">LSA Server Password Set</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555038">LSA SAM Logon</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555118">LSA SAM Logoff</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2555189">\\MAILSLOT\NET\NTLOGON</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2555203">Query for PDC</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555404">SAM Logon</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2555654">SRVSVC Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2555688">Net Share Enum</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555856">Net Server Get Info</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2555945">Cryptographic side of NT Domain Authentication</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2555952">Definitions</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556077">Protocol</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556156">Comments</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2556198">SIDs and RIDs</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2556230">Well-known SIDs</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556468">Well-known RIDS</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="pt02.html">II. Samba Basics</a></span></dt><dd><dl><dt><span class="chapter"><a href="architecture.html">3. Samba Architecture</a></span></dt><dd><dl><dt><span class="sect1"><a href="architecture.html#id2556692">Introduction</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556735">Multithreading and Samba</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556767">Threading smbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556828">Threading nmbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556873">nbmd Design</a></span></dt></dl></dd><dt><span class="chapter"><a href="debug.html">4. The samba DEBUG system</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug.html#id2556929">New Output Syntax</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557038">The DEBUG() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557144">The DEBUGADD() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557180">The DEBUGLVL() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557271">New Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#id2557276">dbgtext()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2557292">dbghdr()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2557311">format_debug_text()</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="internals.html">5. Samba Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="internals.html#id2557363">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557384">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557513">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557523">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557534">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557545">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557556">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557568">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557580">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557591">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557603">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557614">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557625">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557637">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557648">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557660">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557671">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557683">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557696">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557723">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557848">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557918">Code character table</a></span></dt></dl></dd><dt><span class="chapter"><a href="CodingSuggestions.html">6. Coding Suggestions</a></span></dt><dt><span class="chapter"><a href="contributing.html">7. Contributing code</a></span></dt><dt><span class="chapter"><a href="modules.html">8. Modules</a></span></dt><dd><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></dd></dl></dd><dt><span class="part"><a href="pt03.html">III. Samba Subsystems</a></span></dt><dd><dl><dt><span class="chapter"><a href="rpc-plugin.html">9. RPC Pluggable Modules</a></span></dt><dd><dl><dt><span class="sect1"><a href="rpc-plugin.html#id2558898">About</a></span></dt><dt><span class="sect1"><a href="rpc-plugin.html#id2558913">General Overview</a></span></dt></dl></dd><dt><span class="chapter"><a href="vfs.html">10. VFS Modules</a></span></dt><dd><dl><dt><span class="sect1"><a href="vfs.html#id2559076">The Samba (Posix) VFS layer</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2559117">The general interface</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2559428">Possible VFS operation layers</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2559489">The Interaction between the Samba VFS subsystem and the modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2559495">Initialization and registration</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2559640">How the Modules handle per connection data</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2559841">Upgrading to the New VFS Interface</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2559847">Upgrading from 2.2.* and 3.0alpha modules</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2560251">Some Notes</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2560257">Implement TRANSPARENT functions</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2560276">Implement OPAQUE functions</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parsing.html">11. The smb.conf file</a></span></dt><dd><dl><dt><span class="sect1"><a href="parsing.html#id2560333">Lexical Analysis</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2560405">Handling of Whitespace</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2560450">Handling of Line Continuation</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2560502">Line Continuation Quirks</a></span></dt></dl></dd><dt><span class="sect1"><a href="parsing.html#id2560579">Syntax</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2560636">About params.c</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="wins.html">12. Samba WINS Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="wins.html#id2560674">WINS Failover</a></span></dt></dl></dd><dt><span class="chapter"><a href="pwencrypt.html">13. LanMan and NT Password Encryption</a></span></dt><dd><dl><dt><span class="sect1"><a href="pwencrypt.html#id2560792">Introduction</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2560813">How does it work?</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2560896">The smbpasswd file</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="pt04.html">IV. Debugging and tracing</a></span></dt><dd><dl><dt><span class="chapter"><a href="tracing.html">14. Tracing samba system calls</a></span></dt><dt><span class="chapter"><a href="devprinting.html">15. Samba Printing Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="devprinting.html#id2561382">Abstract</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561395"> Printing Interface to Various Back ends -</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567544"> +</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561471"> Print Queue TDB's -</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567717"> +</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561645"> ChangeID and Client Caching of Printer Information -</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567728"> +</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561655"> Windows NT/2K Printer Change Notify -</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="pt05.html">V. Appendices</a></span></dt><dd><dl><dt><span class="chapter"><a href="Packaging.html">16. Notes to packagers</a></span></dt><dd><dl><dt><span class="sect1"><a href="Packaging.html#id2568047">Versioning</a></span></dt><dt><span class="sect1"><a href="Packaging.html#id2568080">Modules</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Attribution</td></tr></table></div></body></html> +</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="pt05.html">V. Appendices</a></span></dt><dd><dl><dt><span class="chapter"><a href="Packaging.html">16. Notes to packagers</a></span></dt><dd><dl><dt><span class="sect1"><a href="Packaging.html#id2561975">Versioning</a></span></dt><dt><span class="sect1"><a href="Packaging.html#id2562008">Modules</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Attribution</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/internals.html b/docs/htmldocs/Samba3-Developers-Guide/internals.html index de791e6a79..357a932e70 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/internals.html +++ b/docs/htmldocs/Samba3-Developers-Guide/internals.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5. Samba Internals</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="debug.html" title="Chapter 4. The samba DEBUG system"><link rel="next" href="CodingSuggestions.html" title="Chapter 6. Coding Suggestions"></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 5. Samba Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="CodingSuggestions.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 5. Samba Internals"><div class="titlepage"><div><div><h2 class="title"><a name="internals"></a>Chapter 5. Samba Internals</h2></div><div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="surname">Chappell</span></h3><div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:David.Chappell@mail.trincoll.edu">David.Chappell@mail.trincoll.edu</a>></code></p></div></div></div></div><div><p class="pubdate">8 May 1996</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="internals.html#id2563435">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2563456">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2563585">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2563596">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563607">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563618">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563628">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563641">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563652">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563664">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563675">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563686">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563698">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563709">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563720">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563732">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563743">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563755">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2563768">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2563796">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563920">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2563990">Code character table</a></span></dt></dl></div><div class="sect1" title="Character Handling"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563435"></a>Character Handling</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5. Samba Internals</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="debug.html" title="Chapter 4. The samba DEBUG system"><link rel="next" href="CodingSuggestions.html" title="Chapter 6. Coding Suggestions"></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 5. Samba Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="CodingSuggestions.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="internals"></a>Chapter 5. Samba Internals</h2></div><div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="surname">Chappell</span></h3><div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:David.Chappell@mail.trincoll.edu">David.Chappell@mail.trincoll.edu</a>></code></p></div></div></div></div><div><p class="pubdate">8 May 1996</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="internals.html#id2557363">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557384">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557513">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557523">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557534">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557545">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557556">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557568">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557580">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557591">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557603">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557614">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557625">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557637">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557648">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557660">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557671">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557683">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557696">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557723">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557848">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557918">Code character table</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557363"></a>Character Handling</h2></div></div></div><p> This section describes character set handling in Samba, as implemented in Samba 3.0 and above </p><p> @@ -8,39 +8,39 @@ strings to/from DOS codepages. The problem is that there was no way of telling if a particular char* is in dos codepage or unix codepage. This led to a nightmare of code that tried to cope with particular cases without handlingt the general case. -</p></div><div class="sect1" title="The new functions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563456"></a>The new functions</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557384"></a>The new functions</h2></div></div></div><p> The new system works like this: -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="orderedlist"><ol type="1"><li><p> all char* strings inside Samba are "unix" strings. These are multi-byte strings that are in the charset defined by the "unix charset" option in smb.conf. -</p></li><li class="listitem"><p> +</p></li><li><p> there is no single fixed character set for unix strings, but any character set that is used does need the following properties: - </p><div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem"><p> + </p><div class="orderedlist"><ol type="a"><li><p> must not contain NULLs except for termination - </p></li><li class="listitem"><p> + </p></li><li><p> must be 7-bit compatible with C strings, so that a constant string or character in C will be byte-for-byte identical to the equivalent string in the chosen character set. - </p></li><li class="listitem"><p> + </p></li><li><p> when you uppercase or lowercase a string it does not become longer than the original string - </p></li><li class="listitem"><p> + </p></li><li><p> must be able to correctly hold all characters that your client will throw at it </p></li></ol></div><p> For example, UTF-8 is fine, and most multi-byte asian character sets are fine, but UCS2 could not be used for unix strings as they contain nulls. - </p></li><li class="listitem"><p> + </p></li><li><p> when you need to put a string into a buffer that will be sent on the wire, or you need a string in a character set format that is compatible with the clients character set then you need to use a pull_ or push_ function. The pull_ functions pull a string from a wire buffer into a (multi-byte) unix string. The push_ functions push a string out to a wire buffer. -</p></li><li class="listitem"><p> +</p></li><li><p> the two main pull_ and push_ functions you need to understand are pull_string and push_string. These functions take a base pointer that should point at the start of the SMB packet that the string is @@ -57,7 +57,7 @@ The new system works like this: unicode. There are also a number of other convenience functions in charcnv.c that call the pull_/push_ functions with particularly common arguments, such as pull_ascii_pstring() - </p></li><li class="listitem"><p> + </p></li><li><p> The biggest thing to remember is that internal (unix) strings in Samba may now contain multi-byte characters. This means you cannot assume that characters are always 1 byte long. Often this means that you will @@ -65,33 +65,33 @@ The new system works like this: (seemingly) simple task. For examples of how to do this see functions like strchr_m(). I know this is very slow, and we will eventually speed it up but right now we want this stuff correct not fast. -</p></li><li class="listitem"><p> +</p></li><li><p> all lp_ functions now return unix strings. The magic "DOS" flag on parameters is gone. -</p></li><li class="listitem"><p> +</p></li><li><p> all vfs functions take unix strings. Don't convert when passing to them -</p></li></ol></div></div><div class="sect1" title="Macros in byteorder.h"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563585"></a>Macros in byteorder.h</h2></div></div></div><p> +</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557513"></a>Macros in byteorder.h</h2></div></div></div><p> This section describes the macros defined in byteorder.h. These macros are used extensively in the Samba code. -</p><div class="sect2" title="CVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563596"></a>CVAL(buf,pos)</h3></div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557523"></a>CVAL(buf,pos)</h3></div></div></div><p> returns the byte at offset pos within buffer buf as an unsigned character. -</p></div><div class="sect2" title="PVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563607"></a>PVAL(buf,pos)</h3></div></div></div><p>returns the value of CVAL(buf,pos) cast to type unsigned integer.</p></div><div class="sect2" title="SCVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563618"></a>SCVAL(buf,pos,val)</h3></div></div></div><p>sets the byte at offset pos within buffer buf to value val.</p></div><div class="sect2" title="SVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563628"></a>SVAL(buf,pos)</h3></div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557534"></a>PVAL(buf,pos)</h3></div></div></div><p>returns the value of CVAL(buf,pos) cast to type unsigned integer.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557545"></a>SCVAL(buf,pos,val)</h3></div></div></div><p>sets the byte at offset pos within buffer buf to value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557556"></a>SVAL(buf,pos)</h3></div></div></div><p> returns the value of the unsigned short (16 bit) little-endian integer at offset pos within buffer buf. An integer of this type is sometimes refered to as "USHORT". -</p></div><div class="sect2" title="IVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563641"></a>IVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit little-endian integer at offset -pos within buffer buf.</p></div><div class="sect2" title="SVALS(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563652"></a>SVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed short (16 bit) little-endian integer at -offset pos within buffer buf.</p></div><div class="sect2" title="IVALS(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563664"></a>IVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed 32 bit little-endian integer at offset pos -within buffer buf.</p></div><div class="sect2" title="SSVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563675"></a>SSVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned short (16 bit) little-endian integer at offset pos within -buffer buf to value val.</p></div><div class="sect2" title="SIVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563686"></a>SIVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned 32 bit little-endian integer at offset pos within buffer -buf to the value val.</p></div><div class="sect2" title="SSVALS(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563698"></a>SSVALS(buf,pos,val)</h3></div></div></div><p>sets the short (16 bit) signed little-endian integer at offset pos within -buffer buf to the value val.</p></div><div class="sect2" title="SIVALS(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563709"></a>SIVALS(buf,pos,val)</h3></div></div></div><p>sets the signed 32 bit little-endian integer at offset pos withing buffer -buf to the value val.</p></div><div class="sect2" title="RSVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563720"></a>RSVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned short (16 bit) big-endian integer at -offset pos within buffer buf.</p></div><div class="sect2" title="RIVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563732"></a>RIVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit big-endian integer at offset -pos within buffer buf.</p></div><div class="sect2" title="RSSVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563743"></a>RSSVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned short (16 bit) big-endian integer at +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557568"></a>IVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit little-endian integer at offset +pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557580"></a>SVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed short (16 bit) little-endian integer at +offset pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557591"></a>IVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed 32 bit little-endian integer at offset pos +within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557603"></a>SSVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned short (16 bit) little-endian integer at offset pos within +buffer buf to value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557614"></a>SIVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned 32 bit little-endian integer at offset pos within buffer +buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557625"></a>SSVALS(buf,pos,val)</h3></div></div></div><p>sets the short (16 bit) signed little-endian integer at offset pos within +buffer buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557637"></a>SIVALS(buf,pos,val)</h3></div></div></div><p>sets the signed 32 bit little-endian integer at offset pos withing buffer +buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557648"></a>RSVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned short (16 bit) big-endian integer at +offset pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557660"></a>RIVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit big-endian integer at offset +pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557671"></a>RSSVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned short (16 bit) big-endian integer at offset pos within buffer buf to value val. -refered to as "USHORT".</p></div><div class="sect2" title="RSIVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563755"></a>RSIVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned 32 bit big-endian integer at offset -pos within buffer buf to value val.</p></div></div><div class="sect1" title="LAN Manager Samba API"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563768"></a>LAN Manager Samba API</h2></div></div></div><p> +refered to as "USHORT".</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557683"></a>RSIVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned 32 bit big-endian integer at offset +pos within buffer buf to value val.</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557696"></a>LAN Manager Samba API</h2></div></div></div><p> This section describes the functions need to make a LAN Manager RPC call. This information had been obtained by examining the Samba code and the LAN Manager 2.0 API documentation. It should not be considered entirely @@ -104,63 +104,63 @@ call_api(int prcnt, int drcnt, int mprcnt, int mdrcnt, </p><p> This function is defined in client.c. It uses an SMB transaction to call a remote api. -</p><div class="sect2" title="Parameters"><div class="titlepage"><div><div><h3 class="title"><a name="id2563796"></a>Parameters</h3></div></div></div><p>The parameters are as follows:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557723"></a>Parameters</h3></div></div></div><p>The parameters are as follows:</p><div class="orderedlist"><ol type="1"><li><p> prcnt: the number of bytes of parameters begin sent. -</p></li><li class="listitem"><p> +</p></li><li><p> drcnt: the number of bytes of data begin sent. -</p></li><li class="listitem"><p> +</p></li><li><p> mprcnt: the maximum number of bytes of parameters which should be returned -</p></li><li class="listitem"><p> +</p></li><li><p> mdrcnt: the maximum number of bytes of data which should be returned -</p></li><li class="listitem"><p> +</p></li><li><p> param: a pointer to the parameters to be sent. -</p></li><li class="listitem"><p> +</p></li><li><p> data: a pointer to the data to be sent. -</p></li><li class="listitem"><p> +</p></li><li><p> rparam: a pointer to a pointer which will be set to point to the returned parameters. The caller of call_api() must deallocate this memory. -</p></li><li class="listitem"><p> +</p></li><li><p> rdata: a pointer to a pointer which will be set to point to the returned data. The caller of call_api() must deallocate this memory. </p></li></ol></div><p> These are the parameters which you ought to send, in the order of their appearance in the parameter block: -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="orderedlist"><ol type="1"><li><p> An unsigned 16 bit integer API number. You should set this value with SSVAL(). I do not know where these numbers are described. -</p></li><li class="listitem"><p> +</p></li><li><p> An ASCIIZ string describing the parameters to the API function as defined in the LAN Manager documentation. The first parameter, which is the server name, is ommited. This string is based uppon the API function as described in the manual, not the data which is actually passed. -</p></li><li class="listitem"><p> +</p></li><li><p> An ASCIIZ string describing the data structure which ought to be returned. -</p></li><li class="listitem"><p> +</p></li><li><p> Any parameters which appear in the function call, as defined in the LAN Manager API documentation, after the "Server" and up to and including the "uLevel" parameters. -</p></li><li class="listitem"><p> +</p></li><li><p> An unsigned 16 bit integer which gives the size in bytes of the buffer we will use to receive the returned array of data structures. Presumably this should be the same as mdrcnt. This value should be set with SSVAL(). -</p></li><li class="listitem"><p> +</p></li><li><p> An ASCIIZ string describing substructures which should be returned. If no substructures apply, this string is of zero length. </p></li></ol></div><p> The code in client.c always calls call_api() with no data. It is unclear when a non-zero length data buffer would be sent. -</p></div><div class="sect2" title="Return value"><div class="titlepage"><div><div><h3 class="title"><a name="id2563920"></a>Return value</h3></div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557848"></a>Return value</h3></div></div></div><p> The returned parameters (pointed to by rparam), in their order of appearance -are:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +are:</p><div class="orderedlist"><ol type="1"><li><p> An unsigned 16 bit integer which contains the API function's return code. This value should be read with SVAL(). -</p></li><li class="listitem"><p> +</p></li><li><p> An adjustment which tells the amount by which pointers in the returned data should be adjusted. This value should be read with SVAL(). Basically, the address of the start of the returned data buffer should have the returned pointer value added to it and then have this value subtracted from it in order to obtain the currect offset into the returned data buffer. -</p></li><li class="listitem"><p> +</p></li><li><p> A count of the number of elements in the array of structures returned. It is also possible that this may sometimes be the number of bytes returned. </p></li></ol></div><p> @@ -180,27 +180,27 @@ fix_char_ptr() in client.c can be used for this purpose. The third parameter (which may be read as "SVAL(rparam,4)") has something to do with indicating the amount of data returned or possibly the amount of data which can be returned if enough buffer space is allowed. -</p></div></div><div class="sect1" title="Code character table"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563990"></a>Code character table</h2></div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557918"></a>Code character table</h2></div></div></div><p> Certain data structures are described by means of ASCIIz strings containing code characters. These are the code characters: -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="orderedlist"><ol type="1"><li><p> W a type byte little-endian unsigned integer -</p></li><li class="listitem"><p> +</p></li><li><p> N a count of substructures which follow -</p></li><li class="listitem"><p> +</p></li><li><p> D a four byte little-endian unsigned integer -</p></li><li class="listitem"><p> +</p></li><li><p> B a byte (with optional count expressed as trailing ASCII digits) -</p></li><li class="listitem"><p> +</p></li><li><p> z a four byte offset to a NULL terminated string -</p></li><li class="listitem"><p> +</p></li><li><p> l a four byte offset to non-string user data -</p></li><li class="listitem"><p> +</p></li><li><p> b an offset to data (with count expressed as trailing ASCII digits) -</p></li><li class="listitem"><p> +</p></li><li><p> r pointer to returned data buffer??? -</p></li><li class="listitem"><p> +</p></li><li><p> L length in bytes of returned data buffer??? -</p></li><li class="listitem"><p> +</p></li><li><p> h number of bytes of information available??? </p></li></ol></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="CodingSuggestions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. The samba DEBUG system </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. Coding Suggestions</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/modules.html b/docs/htmldocs/Samba3-Developers-Guide/modules.html index 4679a893bf..ab49c0d494 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/modules.html +++ b/docs/htmldocs/Samba3-Developers-Guide/modules.html @@ -1,7 +1,7 @@ -<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"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></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> +<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"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></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> The new modules system has the following advantages: -</p><table border="0" summary="Simple list" class="simplelist"><tr><td>Transparent loading of static and shared modules (no need -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> +</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Transparent loading of static and shared modules (no need +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" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2558608"></a>Loading modules</h2></div></div></div><p> 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 </pre><p> This function will be called by the initialisation function of the module to register itself. -</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> +</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> 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 <code class="filename">include/config.h</code>): @@ -21,7 +21,7 @@ it is here currently (from <code class="filename">include/config.h</code>): </pre><p> These functions should be called before the subsystem is used. That should be done when the subsystem is initialised or first used. -</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> +</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> 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'. </p><p>After smb_probe_module() has been executed, the subsystem should check again if the module has been registered. -</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> +</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> Each module has an initialisation function. For modules that are included 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()). 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; } -</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> +</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> 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'. @@ -64,7 +64,7 @@ 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 <code class="literal">static_init_subsystem;</code> calls need to be rebuilded. -</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><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="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="contributing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pt03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 7. Contributing code </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part III. Samba Subsystems</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/ntdomain.html b/docs/htmldocs/Samba3-Developers-Guide/ntdomain.html index 8d853fb69c..3a845792f3 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/ntdomain.html +++ b/docs/htmldocs/Samba3-Developers-Guide/ntdomain.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 2. NT Domain RPC's</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="pt01.html" title="Part I. The protocol"><link rel="prev" href="unix-smb.html" title="Chapter 1. NetBIOS in a Unix World"><link rel="next" href="pt02.html" title="Part II. Samba Basics"></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 2. NT Domain RPC's</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="unix-smb.html">Prev</a> </td><th width="60%" align="center">Part I. The protocol</th><td width="20%" align="right"> <a accesskey="n" href="pt02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 2. NT Domain RPC's"><div class="titlepage"><div><div><h2 class="title"><a name="ntdomain"></a>Chapter 2. NT Domain RPC's</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Luke</span> <span class="surname">Leighton</span></h3><div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:lkcl@switchboard.net">lkcl@switchboard.net</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Paul</span> <span class="surname">Ashton</span></h3><div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:paul@argo.demon.co.uk">paul@argo.demon.co.uk</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Duncan</span> <span class="surname">Stansfield</span></h3><div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:duncans@sco.com">duncans@sco.com</a>></code></p></div></div></div></div><div><p class="pubdate">01 November 97(version 0.0.24)</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ntdomain.html#id2556159">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2556325">Sources</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556351">Credits</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2556382">Notes and Structures</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2556388">Notes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556450">Enumerations</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556613">Structures</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2558885">MSRPC over Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2558896">MSRPC Pipes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2558979">Header</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559653">Tail</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559688">RPC Bind / Bind Ack</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559827">NTLSA Transact Named Pipe</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559955">LSA Open Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560051">LSA Query Info Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560132">LSA Enumerate Trusted Domains</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560202">LSA Open Secret</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560285">LSA Close</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560336">LSA Lookup SIDS</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560497">LSA Lookup Names</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2560669">NETLOGON rpc Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2560795">LSA Request Challenge</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560904">LSA Authenticate 2</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561019">LSA Server Password Set</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561111">LSA SAM Logon</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561190">LSA SAM Logoff</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2561262">\\MAILSLOT\NET\NTLOGON</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2561276">Query for PDC</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561476">SAM Logon</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2561726">SRVSVC Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2561760">Net Share Enum</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561928">Net Server Get Info</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2562018">Cryptographic side of NT Domain Authentication</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2562024">Definitions</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2562150">Protocol</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2562229">Comments</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2562270">SIDs and RIDs</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2562302">Well-known SIDs</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2562541">Well-known RIDS</a></span></dt></dl></dd></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556159"></a>Introduction</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 2. NT Domain RPC's</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="pt01.html" title="Part I. The protocol"><link rel="prev" href="unix-smb.html" title="Chapter 1. NetBIOS in a Unix World"><link rel="next" href="pt02.html" title="Part II. Samba Basics"></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 2. NT Domain RPC's</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="unix-smb.html">Prev</a> </td><th width="60%" align="center">Part I. The protocol</th><td width="20%" align="right"> <a accesskey="n" href="pt02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="ntdomain"></a>Chapter 2. NT Domain RPC's</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Luke</span> <span class="surname">Leighton</span></h3><div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:lkcl@switchboard.net">lkcl@switchboard.net</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Paul</span> <span class="surname">Ashton</span></h3><div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:paul@argo.demon.co.uk">paul@argo.demon.co.uk</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Duncan</span> <span class="surname">Stansfield</span></h3><div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:duncans@sco.com">duncans@sco.com</a>></code></p></div></div></div></div><div><p class="pubdate">01 November 97(version 0.0.24)</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ntdomain.html#id2550090">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2550255">Sources</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2550282">Credits</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2550313">Notes and Structures</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2550318">Notes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2550381">Enumerations</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2550543">Structures</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2552813">MSRPC over Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2552823">MSRPC Pipes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2552907">Header</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553580">Tail</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553616">RPC Bind / Bind Ack</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553755">NTLSA Transact Named Pipe</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553883">LSA Open Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553978">LSA Query Info Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554060">LSA Enumerate Trusted Domains</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554130">LSA Open Secret</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554213">LSA Close</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554264">LSA Lookup SIDS</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554425">LSA Lookup Names</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2554597">NETLOGON rpc Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2554723">LSA Request Challenge</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554832">LSA Authenticate 2</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554947">LSA Server Password Set</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555038">LSA SAM Logon</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555118">LSA SAM Logoff</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2555189">\\MAILSLOT\NET\NTLOGON</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2555203">Query for PDC</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555404">SAM Logon</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2555654">SRVSVC Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2555688">Net Share Enum</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555856">Net Server Get Info</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2555945">Cryptographic side of NT Domain Authentication</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2555952">Definitions</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556077">Protocol</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556156">Comments</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2556198">SIDs and RIDs</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2556230">Well-known SIDs</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556468">Well-known RIDS</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="id2550090"></a>Introduction</h2></div></div></div><p> This document contains information to provide an NT workstation with login services, without the need for an NT server. It is the sgml version of <a class="ulink" href="http://mailhost.cb1.com/~lkcl/cifsntdomain.txt" target="_top">http://mailhost.cb1.com/~lkcl/cifsntdomain.txt</a>, controlled by Luke. </p><p> @@ -38,23 +38,23 @@ and defines that are usefully documented elsewhere. </p><p> This document is by no means complete or authoritative. Missing sections include, but are not limited to: -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Mappings of RIDs to usernames (and vice-versa).</p></li><li class="listitem"><p>What a User ID is and what a Group ID is.</p></li><li class="listitem"><p>The exact meaning/definition of various magic constants or enumerations.</p></li><li class="listitem"><p>The reply error code and use of that error code when a +</p><div class="orderedlist"><ol type="1"><li><p>Mappings of RIDs to usernames (and vice-versa).</p></li><li><p>What a User ID is and what a Group ID is.</p></li><li><p>The exact meaning/definition of various magic constants or enumerations.</p></li><li><p>The reply error code and use of that error code when a workstation becomes a member of a domain (to be described later). Failure to return this error code will make the workstation report -that it is already a member of the domain.</p></li><li class="listitem"><p>the cryptographic side of the NetrServerPasswordSet command, +that it is already a member of the domain.</p></li><li><p>the cryptographic side of the NetrServerPasswordSet command, which would allow the workstation to change its password. This password is used to generate the long-term session key. [It is possible to reject this -command, and keep the default workstation password].</p></li></ol></div><div class="sect2" title="Sources"><div class="titlepage"><div><div><h3 class="title"><a name="id2556325"></a>Sources</h3></div></div></div><table border="0" summary="Simple list" class="simplelist"><tr><td>cket Traces from Netmonitor (Service Pack 1 and above)</td></tr><tr><td>ul Ashton and Luke Leighton's other "NT Domain" doc.</td></tr><tr><td>FS documentation - cifs6.txt</td></tr><tr><td>FS documentation - cifsrap2.txt</td></tr></table></div><div class="sect2" title="Credits"><div class="titlepage"><div><div><h3 class="title"><a name="id2556351"></a>Credits</h3></div></div></div><table border="0" summary="Simple list" class="simplelist"><tr><td>Paul Ashton: loads of work with Net Monitor; understanding the NT authentication system; reference implementation of the NT domain support on which this document is originally based.</td></tr><tr><td>Duncan Stansfield: low-level analysis of MSRPC Pipes.</td></tr><tr><td>Linus Nordberg: producing c-code from Paul's crypto spec.</td></tr><tr><td>Windows Sourcer development team</td></tr></table></div></div><div class="sect1" title="Notes and Structures"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556382"></a>Notes and Structures</h2></div></div></div><div class="sect2" title="Notes"><div class="titlepage"><div><div><h3 class="title"><a name="id2556388"></a>Notes</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +command, and keep the default workstation password].</p></li></ol></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2550255"></a>Sources</h3></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>cket Traces from Netmonitor (Service Pack 1 and above)</td></tr><tr><td>ul Ashton and Luke Leighton's other "NT Domain" doc.</td></tr><tr><td>FS documentation - cifs6.txt</td></tr><tr><td>FS documentation - cifsrap2.txt</td></tr></table></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2550282"></a>Credits</h3></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Paul Ashton: loads of work with Net Monitor; understanding the NT authentication system; reference implementation of the NT domain support on which this document is originally based.</td></tr><tr><td>Duncan Stansfield: low-level analysis of MSRPC Pipes.</td></tr><tr><td>Linus Nordberg: producing c-code from Paul's crypto spec.</td></tr><tr><td>Windows Sourcer development team</td></tr></table></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2550313"></a>Notes and Structures</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2550318"></a>Notes</h3></div></div></div><div class="orderedlist"><ol type="1"><li><p> In the SMB Transact pipes, some "Structures", described here, appear to be 4-byte aligned with the SMB header, at their start. Exactly which "Structures" need aligning is not precisely known or documented. -</p></li><li class="listitem"><p> +</p></li><li><p> In the UDP NTLOGON Mailslots, some "Structures", described here, appear to be 2-byte aligned with the start of the mailslot, at their start. -</p></li><li class="listitem"><p> +</p></li><li><p> Domain SID is of the format S-revision-version-auth1-auth2...authN. e.g S-1-5-123-456-789-123-456. the 5 could be a sub-revision. -</p></li><li class="listitem"><p> +</p></li><li><p> any undocumented buffer pointers must be non-zero if the string buffer it refers to contains characters. exactly what value they should be is unknown. 0x0000 0002 seems to do the trick to indicate that the buffer exists. a @@ -65,22 +65,22 @@ empirically derived from, for example, the LSA SAM Logon response packet, where if the buffer pointer is NULL, the user information is not inserted into the data stream. Exactly what happens with an array of buffer pointers is not known, although an educated guess can be made. -</p></li><li class="listitem"><p> +</p></li><li><p> an array of structures (a container) appears to have a count and a pointer. if the count is zero, the pointer is also zero. no further data is put into or taken out of the SMB data stream. if the count is non-zero, then the pointer is also non-zero. immediately following the pointer is the count again, followed by an array of container sub-structures. the count appears a third time after the last sub-structure. -</p></li></ol></div></div><div class="sect2" title="Enumerations"><div class="titlepage"><div><div><h3 class="title"><a name="id2556450"></a>Enumerations</h3></div></div></div><div class="sect3" title="MSRPC Header type"><div class="titlepage"><div><div><h4 class="title"><a name="id2556456"></a>MSRPC Header type</h4></div></div></div><p>command number in the msrpc packet header</p><div class="variablelist"><dl><dt><span class="term">MSRPC_Request:</span></dt><dd><p>0x00</p></dd><dt><span class="term">MSRPC_Response:</span></dt><dd><p>0x02</p></dd><dt><span class="term">MSRPC_Bind:</span></dt><dd><p>0x0B</p></dd><dt><span class="term">MSRPC_BindAck:</span></dt><dd><p>0x0C</p></dd></dl></div></div><div class="sect3" title="MSRPC Packet info"><div class="titlepage"><div><div><h4 class="title"><a name="id2556514"></a>MSRPC Packet info</h4></div></div></div><p>The meaning of these flags is undocumented</p><div class="variablelist"><dl><dt><span class="term">FirstFrag:</span></dt><dd><p>0x01 </p></dd><dt><span class="term">LastFrag:</span></dt><dd><p>0x02 </p></dd><dt><span class="term">NotaFrag:</span></dt><dd><p>0x04 </p></dd><dt><span class="term">RecRespond:</span></dt><dd><p>0x08 </p></dd><dt><span class="term">NoMultiplex:</span></dt><dd><p>0x10 </p></dd><dt><span class="term">NotForIdemp:</span></dt><dd><p>0x20 </p></dd><dt><span class="term">NotforBcast:</span></dt><dd><p>0x40 </p></dd><dt><span class="term">NoUuid:</span></dt><dd><p>0x80 </p></dd></dl></div></div></div><div class="sect2" title="Structures"><div class="titlepage"><div><div><h3 class="title"><a name="id2556613"></a>Structures</h3></div></div></div><div class="sect3" title="VOID *"><div class="titlepage"><div><div><h4 class="title"><a name="id2556618"></a>VOID *</h4></div></div></div><p>sizeof VOID* is 32 bits.</p></div><div class="sect3" title="char"><div class="titlepage"><div><div><h4 class="title"><a name="id2556627"></a>char</h4></div></div></div><p>sizeof char is 8 bits.</p></div><div class="sect3" title="UTIME"><div class="titlepage"><div><div><h4 class="title"><a name="id2556635"></a>UTIME</h4></div></div></div><p>UTIME is 32 bits, indicating time in seconds since 01jan1970. documented in cifs6.txt (section 3.5 page, page 30).</p></div><div class="sect3" title="NTTIME"><div class="titlepage"><div><div><h4 class="title"><a name="id2556646"></a>NTTIME</h4></div></div></div><p>NTTIME is 64 bits. documented in cifs6.txt (section 3.5 page, page 30).</p></div><div class="sect3" title="DOM_SID (domain SID structure)"><div class="titlepage"><div><div><h4 class="title"><a name="id2556656"></a>DOM_SID (domain SID structure)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>num of sub-authorities in domain SID</p></dd><dt><span class="term">UINT8</span></dt><dd><p>SID revision number</p></dd><dt><span class="term">UINT8</span></dt><dd><p>num of sub-authorities in domain SID</p></dd><dt><span class="term">UINT8[6]</span></dt><dd><p>6 bytes for domain SID - Identifier Authority.</p></dd><dt><span class="term">UINT16[n_subauths]</span></dt><dd><p>domain SID sub-authorities</p></dd></dl></div><p><span class="emphasis"><em>Note: the domain SID is documented elsewhere.</em></span> -</p></div><div class="sect3" title="STR (string)"><div class="titlepage"><div><div><h4 class="title"><a name="id2556728"></a>STR (string)</h4></div></div></div><p>STR (string) is a char[] : a null-terminated string of ascii characters.</p></div><div class="sect3" title="UNIHDR (unicode string header)"><div class="titlepage"><div><div><h4 class="title"><a name="id2556739"></a>UNIHDR (unicode string header) </h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>length of unicode string</p></dd><dt><span class="term">UINT16</span></dt><dd><p>max length of unicode string</p></dd><dt><span class="term">UINT32</span></dt><dd><p>4 - undocumented.</p></dd></dl></div></div><div class="sect3" title="UNIHDR2 (unicode string header plus buffer pointer)"><div class="titlepage"><div><div><h4 class="title"><a name="id2556782"></a>UNIHDR2 (unicode string header plus buffer pointer)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UNIHDR</span></dt><dd><p>unicode string header</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd></dl></div></div><div class="sect3" title="UNISTR (unicode string)"><div class="titlepage"><div><div><h4 class="title"><a name="id2556814"></a>UNISTR (unicode string)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16[]</span></dt><dd><p>null-terminated string of unicode characters.</p></dd></dl></div></div><div class="sect3" title="NAME (length-indicated unicode string)"><div class="titlepage"><div><div><h4 class="title"><a name="id2556835"></a>NAME (length-indicated unicode string)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>length of unicode string</p></dd><dt><span class="term">UINT16[]</span></dt><dd><p>null-terminated string of unicode characters.</p></dd></dl></div></div><div class="sect3" title="UNISTR2 (aligned unicode string)"><div class="titlepage"><div><div><h4 class="title"><a name="id2556868"></a>UNISTR2 (aligned unicode string)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT8[]</span></dt><dd><p>padding to get unicode string 4-byte aligned with the start of the SMB header.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>max length of unicode string</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>length of unicode string</p></dd><dt><span class="term">UINT16[]</span></dt><dd><p>string of uncode characters</p></dd></dl></div></div><div class="sect3" title="OBJ_ATTR (object attributes)"><div class="titlepage"><div><div><h4 class="title"><a name="id2556933"></a>OBJ_ATTR (object attributes)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>0x18 - length (in bytes) including the length field.</p></dd><dt><span class="term">VOID*</span></dt><dd><p>0 - root directory (pointer)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>0 - object name (pointer)</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - attributes (undocumented)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>0 - security descriptior (pointer)</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - security quality of service</p></dd></dl></div></div><div class="sect3" title="POL_HND (LSA policy handle)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557006"></a>POL_HND (LSA policy handle)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">char[20]</span></dt><dd><p>policy handle</p></dd></dl></div></div><div class="sect3" title="DOM_SID2 (domain SID structure, SIDS stored in unicode)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557026"></a>DOM_SID2 (domain SID structure, SIDS stored in unicode)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>5 - SID type</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UNIHDR2</span></dt><dd><p>domain SID unicode string header</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>domain SID unicode string</p></dd></dl></div><p><span class="emphasis"><em>Note: there is a conflict between the unicode string header and the unicode string itself as to which to use to indicate string length. this will need to be resolved.</em></span></p><p><span class="emphasis"><em>Note: the SID type indicates, for example, an alias; a well-known group etc. this is documented somewhere.</em></span></p></div><div class="sect3" title="DOM_RID (domain RID structure)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557094"></a>DOM_RID (domain RID structure)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>5 - well-known SID. 1 - user SID (see ShowACLs)</p></dd><dt><span class="term">UINT32</span></dt><dd><p>5 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>domain RID </p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - domain index out of above reference domains</p></dd></dl></div></div><div class="sect3" title="LOG_INFO (server, account, client structure)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557147"></a>LOG_INFO (server, account, client structure)</h4></div></div></div><p><span class="emphasis"><em>Note: logon server name starts with two '\' characters and is upper case.</em></span></p><p><span class="emphasis"><em>Note: account name is the logon client name from the LSA Request Challenge, with a $ on the end of it, in upper case.</em></span></p><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon server unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>account name unicode string</p></dd><dt><span class="term">UINT16</span></dt><dd><p>sec_chan - security channel type</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon client machine unicode string</p></dd></dl></div></div><div class="sect3" title="CLNT_SRV (server, client names structure)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557224"></a>CLNT_SRV (server, client names structure)</h4></div></div></div><p><span class="emphasis"><em>Note: logon server name starts with two '\' characters and is upper case.</em></span></p><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon server unicode string</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon client machine unicode string</p></dd></dl></div></div><div class="sect3" title="CREDS (credentials + time stamp)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557284"></a>CREDS (credentials + time stamp)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">char[8]</span></dt><dd><p>credentials</p></dd><dt><span class="term">UTIME</span></dt><dd><p>time stamp</p></dd></dl></div></div><div class="sect3" title="CLNT_INFO2 (server, client structure, client credentials)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557315"></a>CLNT_INFO2 (server, client structure, client credentials)</h4></div></div></div><p><span class="emphasis"><em>Note: whenever this structure appears in a request, you must take a copy of the client-calculated credentials received, because they will beused in subsequent credential checks. the presumed intention is to - maintain an authenticated request/response trail.</em></span></p><div class="variablelist"><dl><dt><span class="term">CLNT_SRV</span></dt><dd><p>client and server names</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>???? padding, for 4-byte alignment with SMB header.</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to client credentials.</p></dd><dt><span class="term">CREDS</span></dt><dd><p>client-calculated credentials + client time</p></dd></dl></div></div><div class="sect3" title="CLNT_INFO (server, account, client structure, client credentials)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557380"></a>CLNT_INFO (server, account, client structure, client credentials)</h4></div></div></div><p><span class="emphasis"><em>Note: whenever this structure appears in a request, you must take a copy of the client-calculated credentials received, because they will be used in subsequent credential checks. the presumed intention is to maintain an authenticated request/response trail.</em></span></p><div class="variablelist"><dl><dt><span class="term">LOG_INFO</span></dt><dd><p>logon account info</p></dd><dt><span class="term">CREDS</span></dt><dd><p>client-calculated credentials + client time</p></dd></dl></div></div><div class="sect3" title="ID_INFO_1 (id info structure, auth level 1)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557421"></a>ID_INFO_1 (id info structure, auth level 1)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>ptr_id_info_1</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>domain name unicode header</p></dd><dt><span class="term">UINT32</span></dt><dd><p>param control</p></dd><dt><span class="term">UINT64</span></dt><dd><p>logon ID</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>user name unicode header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>workgroup name unicode header</p></dd><dt><span class="term">char[16]</span></dt><dd><p>arc4 LM OWF Password</p></dd><dt><span class="term">char[16]</span></dt><dd><p>arc4 NT OWF Password</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>domain name unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>user name unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>workstation name unicode string</p></dd></dl></div></div><div class="sect3" title="SAM_INFO (sam logon/logoff id info structure)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557550"></a>SAM_INFO (sam logon/logoff id info structure)</h4></div></div></div><p><span class="emphasis"><em>Note: presumably, the return credentials is supposedly for the server to verify that the credential chain hasn't been compromised.</em></span></p><div class="variablelist"><dl><dt><span class="term">CLNT_INFO2</span></dt><dd><p>client identification/authentication info</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to return credentials.</p></dd><dt><span class="term">CRED</span></dt><dd><p>return credentials - ignored.</p></dd><dt><span class="term">UINT16</span></dt><dd><p>logon level</p></dd><dt><span class="term">UINT16</span></dt><dd><p>switch value</p></dd></dl></div><pre class="programlisting"> +</p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2550381"></a>Enumerations</h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550386"></a>MSRPC Header type</h4></div></div></div><p>command number in the msrpc packet header</p><div class="variablelist"><dl><dt><span class="term">MSRPC_Request:</span></dt><dd><p>0x00</p></dd><dt><span class="term">MSRPC_Response:</span></dt><dd><p>0x02</p></dd><dt><span class="term">MSRPC_Bind:</span></dt><dd><p>0x0B</p></dd><dt><span class="term">MSRPC_BindAck:</span></dt><dd><p>0x0C</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550444"></a>MSRPC Packet info</h4></div></div></div><p>The meaning of these flags is undocumented</p><div class="variablelist"><dl><dt><span class="term">FirstFrag:</span></dt><dd><p>0x01 </p></dd><dt><span class="term">LastFrag:</span></dt><dd><p>0x02 </p></dd><dt><span class="term">NotaFrag:</span></dt><dd><p>0x04 </p></dd><dt><span class="term">RecRespond:</span></dt><dd><p>0x08 </p></dd><dt><span class="term">NoMultiplex:</span></dt><dd><p>0x10 </p></dd><dt><span class="term">NotForIdemp:</span></dt><dd><p>0x20 </p></dd><dt><span class="term">NotforBcast:</span></dt><dd><p>0x40 </p></dd><dt><span class="term">NoUuid:</span></dt><dd><p>0x80 </p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2550543"></a>Structures</h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550548"></a>VOID *</h4></div></div></div><p>sizeof VOID* is 32 bits.</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550557"></a>char</h4></div></div></div><p>sizeof char is 8 bits.</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550566"></a>UTIME</h4></div></div></div><p>UTIME is 32 bits, indicating time in seconds since 01jan1970. documented in cifs6.txt (section 3.5 page, page 30).</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550576"></a>NTTIME</h4></div></div></div><p>NTTIME is 64 bits. documented in cifs6.txt (section 3.5 page, page 30).</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550586"></a>DOM_SID (domain SID structure)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>num of sub-authorities in domain SID</p></dd><dt><span class="term">UINT8</span></dt><dd><p>SID revision number</p></dd><dt><span class="term">UINT8</span></dt><dd><p>num of sub-authorities in domain SID</p></dd><dt><span class="term">UINT8[6]</span></dt><dd><p>6 bytes for domain SID - Identifier Authority.</p></dd><dt><span class="term">UINT16[n_subauths]</span></dt><dd><p>domain SID sub-authorities</p></dd></dl></div><p><span class="emphasis"><em>Note: the domain SID is documented elsewhere.</em></span> +</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550658"></a>STR (string)</h4></div></div></div><p>STR (string) is a char[] : a null-terminated string of ascii characters.</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550669"></a>UNIHDR (unicode string header) </h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>length of unicode string</p></dd><dt><span class="term">UINT16</span></dt><dd><p>max length of unicode string</p></dd><dt><span class="term">UINT32</span></dt><dd><p>4 - undocumented.</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550710"></a>UNIHDR2 (unicode string header plus buffer pointer)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UNIHDR</span></dt><dd><p>unicode string header</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550742"></a>UNISTR (unicode string)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16[]</span></dt><dd><p>null-terminated string of unicode characters.</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550763"></a>NAME (length-indicated unicode string)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>length of unicode string</p></dd><dt><span class="term">UINT16[]</span></dt><dd><p>null-terminated string of unicode characters.</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550796"></a>UNISTR2 (aligned unicode string)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT8[]</span></dt><dd><p>padding to get unicode string 4-byte aligned with the start of the SMB header.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>max length of unicode string</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>length of unicode string</p></dd><dt><span class="term">UINT16[]</span></dt><dd><p>string of uncode characters</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550861"></a>OBJ_ATTR (object attributes)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>0x18 - length (in bytes) including the length field.</p></dd><dt><span class="term">VOID*</span></dt><dd><p>0 - root directory (pointer)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>0 - object name (pointer)</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - attributes (undocumented)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>0 - security descriptior (pointer)</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - security quality of service</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550934"></a>POL_HND (LSA policy handle)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">char[20]</span></dt><dd><p>policy handle</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2550954"></a>DOM_SID2 (domain SID structure, SIDS stored in unicode)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>5 - SID type</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UNIHDR2</span></dt><dd><p>domain SID unicode string header</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>domain SID unicode string</p></dd></dl></div><p><span class="emphasis"><em>Note: there is a conflict between the unicode string header and the unicode string itself as to which to use to indicate string length. this will need to be resolved.</em></span></p><p><span class="emphasis"><em>Note: the SID type indicates, for example, an alias; a well-known group etc. this is documented somewhere.</em></span></p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551021"></a>DOM_RID (domain RID structure)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>5 - well-known SID. 1 - user SID (see ShowACLs)</p></dd><dt><span class="term">UINT32</span></dt><dd><p>5 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>domain RID </p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - domain index out of above reference domains</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551075"></a>LOG_INFO (server, account, client structure)</h4></div></div></div><p><span class="emphasis"><em>Note: logon server name starts with two '\' characters and is upper case.</em></span></p><p><span class="emphasis"><em>Note: account name is the logon client name from the LSA Request Challenge, with a $ on the end of it, in upper case.</em></span></p><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon server unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>account name unicode string</p></dd><dt><span class="term">UINT16</span></dt><dd><p>sec_chan - security channel type</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon client machine unicode string</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551152"></a>CLNT_SRV (server, client names structure)</h4></div></div></div><p><span class="emphasis"><em>Note: logon server name starts with two '\' characters and is upper case.</em></span></p><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon server unicode string</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon client machine unicode string</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551212"></a>CREDS (credentials + time stamp)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">char[8]</span></dt><dd><p>credentials</p></dd><dt><span class="term">UTIME</span></dt><dd><p>time stamp</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551243"></a>CLNT_INFO2 (server, client structure, client credentials)</h4></div></div></div><p><span class="emphasis"><em>Note: whenever this structure appears in a request, you must take a copy of the client-calculated credentials received, because they will beused in subsequent credential checks. the presumed intention is to + maintain an authenticated request/response trail.</em></span></p><div class="variablelist"><dl><dt><span class="term">CLNT_SRV</span></dt><dd><p>client and server names</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>???? padding, for 4-byte alignment with SMB header.</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to client credentials.</p></dd><dt><span class="term">CREDS</span></dt><dd><p>client-calculated credentials + client time</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551308"></a>CLNT_INFO (server, account, client structure, client credentials)</h4></div></div></div><p><span class="emphasis"><em>Note: whenever this structure appears in a request, you must take a copy of the client-calculated credentials received, because they will be used in subsequent credential checks. the presumed intention is to maintain an authenticated request/response trail.</em></span></p><div class="variablelist"><dl><dt><span class="term">LOG_INFO</span></dt><dd><p>logon account info</p></dd><dt><span class="term">CREDS</span></dt><dd><p>client-calculated credentials + client time</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551349"></a>ID_INFO_1 (id info structure, auth level 1)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>ptr_id_info_1</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>domain name unicode header</p></dd><dt><span class="term">UINT32</span></dt><dd><p>param control</p></dd><dt><span class="term">UINT64</span></dt><dd><p>logon ID</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>user name unicode header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>workgroup name unicode header</p></dd><dt><span class="term">char[16]</span></dt><dd><p>arc4 LM OWF Password</p></dd><dt><span class="term">char[16]</span></dt><dd><p>arc4 NT OWF Password</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>domain name unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>user name unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>workstation name unicode string</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551478"></a>SAM_INFO (sam logon/logoff id info structure)</h4></div></div></div><p><span class="emphasis"><em>Note: presumably, the return credentials is supposedly for the server to verify that the credential chain hasn't been compromised.</em></span></p><div class="variablelist"><dl><dt><span class="term">CLNT_INFO2</span></dt><dd><p>client identification/authentication info</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to return credentials.</p></dd><dt><span class="term">CRED</span></dt><dd><p>return credentials - ignored.</p></dd><dt><span class="term">UINT16</span></dt><dd><p>logon level</p></dd><dt><span class="term">UINT16</span></dt><dd><p>switch value</p></dd></dl></div><pre class="programlisting"> switch (switch_value) case 1: { ID_INFO_1 id_info_1; } -</pre></div><div class="sect3" title="GID (group id info)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557631"></a>GID (group id info)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>group id</p></dd><dt><span class="term">UINT32</span></dt><dd><p>user attributes (only used by NT 3.1 and 3.51)</p></dd></dl></div></div><div class="sect3" title="DOM_REF (domain reference info)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557661"></a>DOM_REF (domain reference info)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num referenced domains?</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain name buffer pointer.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>32 - max number of entries</p></dd><dt><span class="term">UINT32</span></dt><dd><p>4 - num referenced domains?</p></dd><dt><span class="term">UNIHDR2</span></dt><dd><p>domain name unicode string header</p></dd><dt><span class="term">UNIHDR2[num_ref_doms-1]</span></dt><dd><p>referenced domain unicode string headers</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>domain name unicode string</p></dd><dt><span class="term">DOM_SID[num_ref_doms]</span></dt><dd><p>referenced domain SIDs</p></dd></dl></div></div><div class="sect3" title="DOM_INFO (domain info, levels 3 and 5 are the same))"><div class="titlepage"><div><div><h4 class="title"><a name="id2557770"></a>DOM_INFO (domain info, levels 3 and 5 are the same))</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT8[]</span></dt><dd><p>??? padding to get 4-byte alignment with start of SMB header</p></dd><dt><span class="term">UINT16</span></dt><dd><p>domain name string length * 2</p></dd><dt><span class="term">UINT16</span></dt><dd><p>domain name string length * 2</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain name string buffer pointer</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain SID string buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>domain name (unicode string)</p></dd><dt><span class="term">DOM_SID</span></dt><dd><p>domain SID</p></dd></dl></div></div><div class="sect3" title="USER_INFO (user logon info)"><div class="titlepage"><div><div><h4 class="title"><a name="id2557858"></a>USER_INFO (user logon info)</h4></div></div></div><p><span class="emphasis"><em>Note: it would be nice to know what the 16 byte user session key is for.</em></span></p><div class="variablelist"><dl><dt><span class="term">NTTIME</span></dt><dd><p>logon time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>logoff time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>kickoff time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>password last set time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>password can change time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>password must change time</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>username unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>user's full name unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>logon script unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>profile path unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>home directory unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>home directory drive unicode string header</p></dd><dt><span class="term">UINT16</span></dt><dd><p>logon count</p></dd><dt><span class="term">UINT16</span></dt><dd><p>bad password count</p></dd><dt><span class="term">UINT32</span></dt><dd><p>User ID</p></dd><dt><span class="term">UINT32</span></dt><dd><p>Group ID</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num groups</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer to groups.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>user flags</p></dd><dt><span class="term">char[16]</span></dt><dd><p>user session key</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>logon server unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>logon domain unicode string header</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented logon domain id pointer</p></dd><dt><span class="term">char[40]</span></dt><dd><p>40 undocumented padding bytes. future expansion?</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - num_other_sids?</p></dd><dt><span class="term">VOID*</span></dt><dd><p>NULL - undocumented pointer to other domain SIDs.</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>username unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>user's full name unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon script unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>profile path unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>home directory unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>home directory drive unicode string</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num groups</p></dd><dt><span class="term">GID[num_groups]</span></dt><dd><p>group info</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon server unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon domain unicode string</p></dd><dt><span class="term">DOM_SID</span></dt><dd><p>domain SID</p></dd><dt><span class="term">DOM_SID[num_sids]</span></dt><dd><p>other domain SIDs?</p></dd></dl></div></div><div class="sect3" title="SH_INFO_1_PTR (pointers to level 1 share info strings)"><div class="titlepage"><div><div><h4 class="title"><a name="id2558290"></a>SH_INFO_1_PTR (pointers to level 1 share info strings)</h4></div></div></div><p><span class="emphasis"><em>Note: see cifsrap2.txt section5, page 10.</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td>0 for shi1_type indicates a Disk.</td></tr><tr><td>1 for shi1_type indicates a Print Queue.</td></tr><tr><td>2 for shi1_type indicates a Device.</td></tr><tr><td>3 for shi1_type indicates an IPC pipe.</td></tr><tr><td>0x8000 0000 (top bit set in shi1_type) indicates a hidden share.</td></tr></table><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>shi1_netname - pointer to net name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>shi1_type - type of share. 0 - undocumented.</p></dd><dt><span class="term">VOID*</span></dt><dd><p>shi1_remark - pointer to comment.</p></dd></dl></div></div><div class="sect3" title="SH_INFO_1_STR (level 1 share info strings)"><div class="titlepage"><div><div><h4 class="title"><a name="id2558366"></a>SH_INFO_1_STR (level 1 share info strings)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UNISTR2</span></dt><dd><p>shi1_netname - unicode string of net name</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>shi1_remark - unicode string of comment.</p></dd></dl></div></div><div class="sect3" title="SHARE_INFO_1_CTR"><div class="titlepage"><div><div><h4 class="title"><a name="id2558399"></a>SHARE_INFO_1_CTR</h4></div></div></div><p>share container with 0 entries:</p><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>0 - EntriesRead</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - Buffer</p></dd></dl></div><p>share container with > 0 entries:</p><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>EntriesRead</p></dd><dt><span class="term">UINT32</span></dt><dd><p>non-zero - Buffer</p></dd><dt><span class="term">UINT32</span></dt><dd><p>EntriesRead</p></dd><dt><span class="term">SH_INFO_1_PTR[EntriesRead]</span></dt><dd><p>share entry pointers</p></dd><dt><span class="term">SH_INFO_1_STR[EntriesRead]</span></dt><dd><p>share entry strings</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to get unicode string 4-byte aligned with start of the SMB header.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>EntriesRead</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - padding</p></dd></dl></div></div><div class="sect3" title="SERVER_INFO_101"><div class="titlepage"><div><div><h4 class="title"><a name="id2558528"></a>SERVER_INFO_101</h4></div></div></div><p><span class="emphasis"><em>Note: see cifs6.txt section 6.4 - the fields described therein will be of assistance here. for example, the type listed below is the same as fServerType, which is described in 6.4.1. </em></span></p><div class="variablelist"><dl><dt><span class="term">SV_TYPE_WORKSTATION</span></dt><dd><p>0x00000001 All workstations</p></dd><dt><span class="term">SV_TYPE_SERVER</span></dt><dd><p>0x00000002 All servers</p></dd><dt><span class="term">SV_TYPE_SQLSERVER</span></dt><dd><p>0x00000004 Any server running with SQL server</p></dd><dt><span class="term">SV_TYPE_DOMAIN_CTRL</span></dt><dd><p>0x00000008 Primary domain controller</p></dd><dt><span class="term">SV_TYPE_DOMAIN_BAKCTRL</span></dt><dd><p>0x00000010 Backup domain controller</p></dd><dt><span class="term">SV_TYPE_TIME_SOURCE</span></dt><dd><p>0x00000020 Server running the timesource service</p></dd><dt><span class="term">SV_TYPE_AFP</span></dt><dd><p>0x00000040 Apple File Protocol servers</p></dd><dt><span class="term">SV_TYPE_NOVELL</span></dt><dd><p>0x00000080 Novell servers</p></dd><dt><span class="term">SV_TYPE_DOMAIN_MEMBER</span></dt><dd><p>0x00000100 Domain Member</p></dd><dt><span class="term">SV_TYPE_PRINTQ_SERVER</span></dt><dd><p>0x00000200 Server sharing print queue</p></dd><dt><span class="term">SV_TYPE_DIALIN_SERVER</span></dt><dd><p>0x00000400 Server running dialin service.</p></dd><dt><span class="term">SV_TYPE_XENIX_SERVER</span></dt><dd><p>0x00000800 Xenix server</p></dd><dt><span class="term">SV_TYPE_NT</span></dt><dd><p>0x00001000 NT server</p></dd><dt><span class="term">SV_TYPE_WFW</span></dt><dd><p>0x00002000 Server running Windows for </p></dd><dt><span class="term">SV_TYPE_SERVER_NT</span></dt><dd><p>0x00008000 Windows NT non DC server</p></dd><dt><span class="term">SV_TYPE_POTENTIAL_BROWSER</span></dt><dd><p>0x00010000 Server that can run the browser service</p></dd><dt><span class="term">SV_TYPE_BACKUP_BROWSER</span></dt><dd><p>0x00020000 Backup browser server</p></dd><dt><span class="term">SV_TYPE_MASTER_BROWSER</span></dt><dd><p>0x00040000 Master browser server</p></dd><dt><span class="term">SV_TYPE_DOMAIN_MASTER</span></dt><dd><p>0x00080000 Domain Master Browser server</p></dd><dt><span class="term">SV_TYPE_LOCAL_LIST_ONLY</span></dt><dd><p>0x40000000 Enumerate only entries marked "local"</p></dd><dt><span class="term">SV_TYPE_DOMAIN_ENUM</span></dt><dd><p>0x80000000 Enumerate Domains. The pszServer and pszDomain parameters must be NULL.</p></dd></dl></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>500 - platform_id</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>5 - major version</p></dd><dt><span class="term">UINT32</span></dt><dd><p>4 - minor version</p></dd><dt><span class="term">UINT32</span></dt><dd><p>type (SV_TYPE_... bit field)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to comment</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>sv101_name - unicode string of server name</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>sv_101_comment - unicode string of server comment.</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to get unicode string 4-byte aligned with start of the SMB header.</p></dd></dl></div></div></div></div><div class="sect1" title="MSRPC over Transact Named Pipe"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2558885"></a>MSRPC over Transact Named Pipe</h2></div></div></div><p>For details on the SMB Transact Named Pipe, see cifs6.txt</p><div class="sect2" title="MSRPC Pipes"><div class="titlepage"><div><div><h3 class="title"><a name="id2558896"></a>MSRPC Pipes</h3></div></div></div><p> +</pre></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551559"></a>GID (group id info)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>group id</p></dd><dt><span class="term">UINT32</span></dt><dd><p>user attributes (only used by NT 3.1 and 3.51)</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551589"></a>DOM_REF (domain reference info)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num referenced domains?</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain name buffer pointer.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>32 - max number of entries</p></dd><dt><span class="term">UINT32</span></dt><dd><p>4 - num referenced domains?</p></dd><dt><span class="term">UNIHDR2</span></dt><dd><p>domain name unicode string header</p></dd><dt><span class="term">UNIHDR2[num_ref_doms-1]</span></dt><dd><p>referenced domain unicode string headers</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>domain name unicode string</p></dd><dt><span class="term">DOM_SID[num_ref_doms]</span></dt><dd><p>referenced domain SIDs</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551698"></a>DOM_INFO (domain info, levels 3 and 5 are the same))</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT8[]</span></dt><dd><p>??? padding to get 4-byte alignment with start of SMB header</p></dd><dt><span class="term">UINT16</span></dt><dd><p>domain name string length * 2</p></dd><dt><span class="term">UINT16</span></dt><dd><p>domain name string length * 2</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain name string buffer pointer</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain SID string buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>domain name (unicode string)</p></dd><dt><span class="term">DOM_SID</span></dt><dd><p>domain SID</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2551786"></a>USER_INFO (user logon info)</h4></div></div></div><p><span class="emphasis"><em>Note: it would be nice to know what the 16 byte user session key is for.</em></span></p><div class="variablelist"><dl><dt><span class="term">NTTIME</span></dt><dd><p>logon time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>logoff time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>kickoff time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>password last set time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>password can change time</p></dd><dt><span class="term">NTTIME</span></dt><dd><p>password must change time</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>username unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>user's full name unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>logon script unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>profile path unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>home directory unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>home directory drive unicode string header</p></dd><dt><span class="term">UINT16</span></dt><dd><p>logon count</p></dd><dt><span class="term">UINT16</span></dt><dd><p>bad password count</p></dd><dt><span class="term">UINT32</span></dt><dd><p>User ID</p></dd><dt><span class="term">UINT32</span></dt><dd><p>Group ID</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num groups</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer to groups.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>user flags</p></dd><dt><span class="term">char[16]</span></dt><dd><p>user session key</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>logon server unicode string header</p></dd><dt><span class="term">UNIHDR</span></dt><dd><p>logon domain unicode string header</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented logon domain id pointer</p></dd><dt><span class="term">char[40]</span></dt><dd><p>40 undocumented padding bytes. future expansion?</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - num_other_sids?</p></dd><dt><span class="term">VOID*</span></dt><dd><p>NULL - undocumented pointer to other domain SIDs.</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>username unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>user's full name unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon script unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>profile path unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>home directory unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>home directory drive unicode string</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num groups</p></dd><dt><span class="term">GID[num_groups]</span></dt><dd><p>group info</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon server unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon domain unicode string</p></dd><dt><span class="term">DOM_SID</span></dt><dd><p>domain SID</p></dd><dt><span class="term">DOM_SID[num_sids]</span></dt><dd><p>other domain SIDs?</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2552218"></a>SH_INFO_1_PTR (pointers to level 1 share info strings)</h4></div></div></div><p><span class="emphasis"><em>Note: see cifsrap2.txt section5, page 10.</em></span></p><table class="simplelist" border="0" summary="Simple list"><tr><td>0 for shi1_type indicates a Disk.</td></tr><tr><td>1 for shi1_type indicates a Print Queue.</td></tr><tr><td>2 for shi1_type indicates a Device.</td></tr><tr><td>3 for shi1_type indicates an IPC pipe.</td></tr><tr><td>0x8000 0000 (top bit set in shi1_type) indicates a hidden share.</td></tr></table><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>shi1_netname - pointer to net name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>shi1_type - type of share. 0 - undocumented.</p></dd><dt><span class="term">VOID*</span></dt><dd><p>shi1_remark - pointer to comment.</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2552293"></a>SH_INFO_1_STR (level 1 share info strings)</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UNISTR2</span></dt><dd><p>shi1_netname - unicode string of net name</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>shi1_remark - unicode string of comment.</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2552327"></a>SHARE_INFO_1_CTR</h4></div></div></div><p>share container with 0 entries:</p><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>0 - EntriesRead</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - Buffer</p></dd></dl></div><p>share container with > 0 entries:</p><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>EntriesRead</p></dd><dt><span class="term">UINT32</span></dt><dd><p>non-zero - Buffer</p></dd><dt><span class="term">UINT32</span></dt><dd><p>EntriesRead</p></dd><dt><span class="term">SH_INFO_1_PTR[EntriesRead]</span></dt><dd><p>share entry pointers</p></dd><dt><span class="term">SH_INFO_1_STR[EntriesRead]</span></dt><dd><p>share entry strings</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to get unicode string 4-byte aligned with start of the SMB header.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>EntriesRead</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - padding</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2552455"></a>SERVER_INFO_101</h4></div></div></div><p><span class="emphasis"><em>Note: see cifs6.txt section 6.4 - the fields described therein will be of assistance here. for example, the type listed below is the same as fServerType, which is described in 6.4.1. </em></span></p><div class="variablelist"><dl><dt><span class="term">SV_TYPE_WORKSTATION</span></dt><dd><p>0x00000001 All workstations</p></dd><dt><span class="term">SV_TYPE_SERVER</span></dt><dd><p>0x00000002 All servers</p></dd><dt><span class="term">SV_TYPE_SQLSERVER</span></dt><dd><p>0x00000004 Any server running with SQL server</p></dd><dt><span class="term">SV_TYPE_DOMAIN_CTRL</span></dt><dd><p>0x00000008 Primary domain controller</p></dd><dt><span class="term">SV_TYPE_DOMAIN_BAKCTRL</span></dt><dd><p>0x00000010 Backup domain controller</p></dd><dt><span class="term">SV_TYPE_TIME_SOURCE</span></dt><dd><p>0x00000020 Server running the timesource service</p></dd><dt><span class="term">SV_TYPE_AFP</span></dt><dd><p>0x00000040 Apple File Protocol servers</p></dd><dt><span class="term">SV_TYPE_NOVELL</span></dt><dd><p>0x00000080 Novell servers</p></dd><dt><span class="term">SV_TYPE_DOMAIN_MEMBER</span></dt><dd><p>0x00000100 Domain Member</p></dd><dt><span class="term">SV_TYPE_PRINTQ_SERVER</span></dt><dd><p>0x00000200 Server sharing print queue</p></dd><dt><span class="term">SV_TYPE_DIALIN_SERVER</span></dt><dd><p>0x00000400 Server running dialin service.</p></dd><dt><span class="term">SV_TYPE_XENIX_SERVER</span></dt><dd><p>0x00000800 Xenix server</p></dd><dt><span class="term">SV_TYPE_NT</span></dt><dd><p>0x00001000 NT server</p></dd><dt><span class="term">SV_TYPE_WFW</span></dt><dd><p>0x00002000 Server running Windows for </p></dd><dt><span class="term">SV_TYPE_SERVER_NT</span></dt><dd><p>0x00008000 Windows NT non DC server</p></dd><dt><span class="term">SV_TYPE_POTENTIAL_BROWSER</span></dt><dd><p>0x00010000 Server that can run the browser service</p></dd><dt><span class="term">SV_TYPE_BACKUP_BROWSER</span></dt><dd><p>0x00020000 Backup browser server</p></dd><dt><span class="term">SV_TYPE_MASTER_BROWSER</span></dt><dd><p>0x00040000 Master browser server</p></dd><dt><span class="term">SV_TYPE_DOMAIN_MASTER</span></dt><dd><p>0x00080000 Domain Master Browser server</p></dd><dt><span class="term">SV_TYPE_LOCAL_LIST_ONLY</span></dt><dd><p>0x40000000 Enumerate only entries marked "local"</p></dd><dt><span class="term">SV_TYPE_DOMAIN_ENUM</span></dt><dd><p>0x80000000 Enumerate Domains. The pszServer and pszDomain parameters must be NULL.</p></dd></dl></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>500 - platform_id</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>5 - major version</p></dd><dt><span class="term">UINT32</span></dt><dd><p>4 - minor version</p></dd><dt><span class="term">UINT32</span></dt><dd><p>type (SV_TYPE_... bit field)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to comment</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>sv101_name - unicode string of server name</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>sv_101_comment - unicode string of server comment.</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to get unicode string 4-byte aligned with start of the SMB header.</p></dd></dl></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2552813"></a>MSRPC over Transact Named Pipe</h2></div></div></div><p>For details on the SMB Transact Named Pipe, see cifs6.txt</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552823"></a>MSRPC Pipes</h3></div></div></div><p> The MSRPC is conducted over an SMB Transact Pipe with a name of <code class="filename">\PIPE\</code>. You must first obtain a 16 bit file handle, by sending a SMBopenX with the pipe name <code class="filename">\PIPE\srvsvc</code> for @@ -121,11 +121,11 @@ listed below:</p><pre class="programlisting"> initial SMBopenX request: RPC API command 0x26 params: "\\PIPE\\lsarpc" 0x65 0x63; 0x72 0x70; 0x44 0x65; "\\PIPE\\srvsvc" 0x73 0x76; 0x4E 0x00; 0x5C 0x43; -</pre></div><div class="sect2" title="Header"><div class="titlepage"><div><div><h3 class="title"><a name="id2558979"></a>Header</h3></div></div></div><p>[section to be rewritten, following receipt of work by Duncan Stansfield]</p><p>Interesting note: if you set packed data representation to 0x0100 0000 -then all 4-byte and 2-byte word ordering is turned around!</p><p>The start of each of the NTLSA and NETLOGON named pipes begins with:</p><div class="segmentedlist"><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>00</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>5 - RPC major version</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>01</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0 - RPC minor version</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>02</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>2 - RPC response packet</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>03</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>3 - (FirstFrag bit-wise or with LastFrag)</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>04</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT32</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0x1000 0000 - packed data representation</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>08</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT16</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>fragment length - data size (bytes) inc header and tail.</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>0A</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT16</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0 - authentication length </div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>0C</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT32</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>call identifier. matches 12th UINT32 of incoming RPC data.</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>10</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT32</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>allocation hint - data size (bytes) minus header and tail.</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>14</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT16</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0 - presentation context identifier</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>16</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0 - cancel count</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>17</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>in replies: 0 - reserved; in requests: opnum - see #defines.</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>18</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>......</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>start of data (goes on for allocation_hint bytes)</div></div></div><div class="sect3" title="RPC_Packet for request, response, bind and bind acknowledgement"><div class="titlepage"><div><div><h4 class="title"><a name="id2559128"></a>RPC_Packet for request, response, bind and bind acknowledgement</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT8 versionmaj</span></dt><dd><p>reply same as request (0x05)</p></dd><dt><span class="term">UINT8 versionmin</span></dt><dd><p>reply same as request (0x00)</p></dd><dt><span class="term">UINT8 type</span></dt><dd><p>one of the MSRPC_Type enums</p></dd><dt><span class="term">UINT8 flags</span></dt><dd><p>reply same as request (0x00 for Bind, 0x03 for Request)</p></dd><dt><span class="term">UINT32 representation</span></dt><dd><p>reply same as request (0x00000010)</p></dd><dt><span class="term">UINT16 fraglength</span></dt><dd><p>the length of the data section of the SMB trans packet</p></dd><dt><span class="term">UINT16 authlength</span></dt><dd><p></p></dd><dt><span class="term">UINT32 callid</span></dt><dd><p>call identifier. (e.g. 0x00149594)</p></dd><dt><span class="term">* stub USE TvPacket</span></dt><dd><p>the remainder of the packet depending on the "type"</p></dd></dl></div></div><div class="sect3" title="Interface identification"><div class="titlepage"><div><div><h4 class="title"><a name="id2559231"></a>Interface identification</h4></div></div></div><p>the interfaces are numbered. as yet I haven't seen more than one interface used on the same pipe name srvsvc</p><pre class="programlisting"> +</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552907"></a>Header</h3></div></div></div><p>[section to be rewritten, following receipt of work by Duncan Stansfield]</p><p>Interesting note: if you set packed data representation to 0x0100 0000 +then all 4-byte and 2-byte word ordering is turned around!</p><p>The start of each of the NTLSA and NETLOGON named pipes begins with:</p><div class="segmentedlist"><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>00</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>5 - RPC major version</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>01</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0 - RPC minor version</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>02</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>2 - RPC response packet</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>03</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>3 - (FirstFrag bit-wise or with LastFrag)</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>04</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT32</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0x1000 0000 - packed data representation</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>08</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT16</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>fragment length - data size (bytes) inc header and tail.</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>0A</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT16</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0 - authentication length </div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>0C</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT32</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>call identifier. matches 12th UINT32 of incoming RPC data.</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>10</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT32</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>allocation hint - data size (bytes) minus header and tail.</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>14</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT16</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0 - presentation context identifier</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>16</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>0 - cancel count</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>17</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>UINT8</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>in replies: 0 - reserved; in requests: opnum - see #defines.</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">offset: </span></strong>18</div><div class="seg"><strong><span class="segtitle">Variable type: </span></strong>......</div><div class="seg"><strong><span class="segtitle">Variable data: </span></strong>start of data (goes on for allocation_hint bytes)</div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553056"></a>RPC_Packet for request, response, bind and bind acknowledgement</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT8 versionmaj</span></dt><dd><p>reply same as request (0x05)</p></dd><dt><span class="term">UINT8 versionmin</span></dt><dd><p>reply same as request (0x00)</p></dd><dt><span class="term">UINT8 type</span></dt><dd><p>one of the MSRPC_Type enums</p></dd><dt><span class="term">UINT8 flags</span></dt><dd><p>reply same as request (0x00 for Bind, 0x03 for Request)</p></dd><dt><span class="term">UINT32 representation</span></dt><dd><p>reply same as request (0x00000010)</p></dd><dt><span class="term">UINT16 fraglength</span></dt><dd><p>the length of the data section of the SMB trans packet</p></dd><dt><span class="term">UINT16 authlength</span></dt><dd><p></p></dd><dt><span class="term">UINT32 callid</span></dt><dd><p>call identifier. (e.g. 0x00149594)</p></dd><dt><span class="term">* stub USE TvPacket</span></dt><dd><p>the remainder of the packet depending on the "type"</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553159"></a>Interface identification</h4></div></div></div><p>the interfaces are numbered. as yet I haven't seen more than one interface used on the same pipe name srvsvc</p><pre class="programlisting"> abstract (0x4B324FC8, 0x01D31670, 0x475A7812, 0x88E16EBF, 0x00000003) transfer (0x8A885D04, 0x11C91CEB, 0x0008E89F, 0x6048102B, 0x00000002) -</pre></div><div class="sect3" title="RPC_Iface RW"><div class="titlepage"><div><div><h4 class="title"><a name="id2559252"></a>RPC_Iface RW</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT8 byte[16]</span></dt><dd><p>16 bytes of number</p></dd><dt><span class="term">UINT32 version</span></dt><dd><p>the interface number</p></dd></dl></div></div><div class="sect3" title="RPC_ReqBind RW"><div class="titlepage"><div><div><h4 class="title"><a name="id2559281"></a>RPC_ReqBind RW</h4></div></div></div><p>the remainder of the packet after the header if "type" was Bind in the response header, "type" should be BindAck</p><div class="variablelist"><dl><dt><span class="term">UINT16 maxtsize</span></dt><dd><p>maximum transmission fragment size (0x1630)</p></dd><dt><span class="term">UINT16 maxrsize</span></dt><dd><p>max receive fragment size (0x1630)</p></dd><dt><span class="term">UINT32 assocgid</span></dt><dd><p>associated group id (0x0)</p></dd><dt><span class="term">UINT32 numelements</span></dt><dd><p>the number of elements (0x1)</p></dd><dt><span class="term">UINT16 contextid</span></dt><dd><p>presentation context identifier (0x0)</p></dd><dt><span class="term">UINT8 numsyntaxes</span></dt><dd><p>the number of syntaxes (has always been 1?)(0x1)</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>4-byte alignment padding, against SMB header</p></dd><dt><span class="term">* abstractint USE RPC_Iface</span></dt><dd><p>num and vers. of interface client is using</p></dd><dt><span class="term">* transferint USE RPC_Iface</span></dt><dd><p>num and vers. of interface to use for replies</p></dd></dl></div></div><div class="sect3" title="RPC_Address RW"><div class="titlepage"><div><div><h4 class="title"><a name="id2559389"></a>RPC_Address RW</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16 length</span></dt><dd><p>length of the string including null terminator</p></dd><dt><span class="term">* port USE string</span></dt><dd><p>the string above in single byte, null terminated form</p></dd></dl></div></div><div class="sect3" title="RPC_ResBind RW"><div class="titlepage"><div><div><h4 class="title"><a name="id2559420"></a>RPC_ResBind RW</h4></div></div></div><p>the response to place after the header in the reply packet</p><div class="variablelist"><dl><dt><span class="term">UINT16 maxtsize</span></dt><dd><p>same as request</p></dd><dt><span class="term">UINT16 maxrsize</span></dt><dd><p>same as request</p></dd><dt><span class="term">UINT32 assocgid</span></dt><dd><p>zero</p></dd><dt><span class="term">* secondaddr USE RPC_Address</span></dt><dd><p>the address string, as described earlier</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>4-byte alignment padding, against SMB header</p></dd><dt><span class="term">UINT8 numresults</span></dt><dd><p>the number of results (0x01)</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>4-byte alignment padding, against SMB header</p></dd><dt><span class="term">UINT16 result</span></dt><dd><p>result (0x00 = accept)</p></dd><dt><span class="term">UINT16 reason</span></dt><dd><p>reason (0x00 = no reason specified)</p></dd><dt><span class="term">* transfersyntax USE RPC_Iface</span></dt><dd><p>the transfer syntax from the request</p></dd></dl></div></div><div class="sect3" title="RPC_ReqNorm RW"><div class="titlepage"><div><div><h4 class="title"><a name="id2559536"></a>RPC_ReqNorm RW</h4></div></div></div><p>the remainder of the packet after the header for every other other request</p><div class="variablelist"><dl><dt><span class="term">UINT32 allochint</span></dt><dd><p>the size of the stub data in bytes</p></dd><dt><span class="term">UINT16 prescontext</span></dt><dd><p>presentation context identifier (0x0)</p></dd><dt><span class="term">UINT16 opnum</span></dt><dd><p>operation number (0x15)</p></dd><dt><span class="term">* stub USE TvPacket</span></dt><dd><p>a packet dependent on the pipe name (probably the interface) and the op number)</p></dd></dl></div></div><div class="sect3" title="RPC_ResNorm RW"><div class="titlepage"><div><div><h4 class="title"><a name="id2559592"></a>RPC_ResNorm RW</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32 allochint</span></dt><dd><p># size of the stub data in bytes</p></dd><dt><span class="term">UINT16 prescontext</span></dt><dd><p># presentation context identifier (same as request)</p></dd><dt><span class="term">UINT8 cancelcount</span></dt><dd><p># cancel count? (0x0)</p></dd><dt><span class="term">UINT8 reserved</span></dt><dd><p># 0 - one byte padding</p></dd><dt><span class="term">* stub USE TvPacket</span></dt><dd><p># the remainder of the reply</p></dd></dl></div></div></div><div class="sect2" title="Tail"><div class="titlepage"><div><div><h3 class="title"><a name="id2559653"></a>Tail</h3></div></div></div><p>The end of each of the NTLSA and NETLOGON named pipes ends with:</p><div class="variablelist"><dl><dt><span class="term">......</span></dt><dd><p>end of data</p></dd><dt><span class="term">UINT32</span></dt><dd><p>return code</p></dd></dl></div></div><div class="sect2" title="RPC Bind / Bind Ack"><div class="titlepage"><div><div><h3 class="title"><a name="id2559688"></a>RPC Bind / Bind Ack</h3></div></div></div><p> +</pre></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553180"></a>RPC_Iface RW</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT8 byte[16]</span></dt><dd><p>16 bytes of number</p></dd><dt><span class="term">UINT32 version</span></dt><dd><p>the interface number</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553208"></a>RPC_ReqBind RW</h4></div></div></div><p>the remainder of the packet after the header if "type" was Bind in the response header, "type" should be BindAck</p><div class="variablelist"><dl><dt><span class="term">UINT16 maxtsize</span></dt><dd><p>maximum transmission fragment size (0x1630)</p></dd><dt><span class="term">UINT16 maxrsize</span></dt><dd><p>max receive fragment size (0x1630)</p></dd><dt><span class="term">UINT32 assocgid</span></dt><dd><p>associated group id (0x0)</p></dd><dt><span class="term">UINT32 numelements</span></dt><dd><p>the number of elements (0x1)</p></dd><dt><span class="term">UINT16 contextid</span></dt><dd><p>presentation context identifier (0x0)</p></dd><dt><span class="term">UINT8 numsyntaxes</span></dt><dd><p>the number of syntaxes (has always been 1?)(0x1)</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>4-byte alignment padding, against SMB header</p></dd><dt><span class="term">* abstractint USE RPC_Iface</span></dt><dd><p>num and vers. of interface client is using</p></dd><dt><span class="term">* transferint USE RPC_Iface</span></dt><dd><p>num and vers. of interface to use for replies</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553317"></a>RPC_Address RW</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16 length</span></dt><dd><p>length of the string including null terminator</p></dd><dt><span class="term">* port USE string</span></dt><dd><p>the string above in single byte, null terminated form</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553348"></a>RPC_ResBind RW</h4></div></div></div><p>the response to place after the header in the reply packet</p><div class="variablelist"><dl><dt><span class="term">UINT16 maxtsize</span></dt><dd><p>same as request</p></dd><dt><span class="term">UINT16 maxrsize</span></dt><dd><p>same as request</p></dd><dt><span class="term">UINT32 assocgid</span></dt><dd><p>zero</p></dd><dt><span class="term">* secondaddr USE RPC_Address</span></dt><dd><p>the address string, as described earlier</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>4-byte alignment padding, against SMB header</p></dd><dt><span class="term">UINT8 numresults</span></dt><dd><p>the number of results (0x01)</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>4-byte alignment padding, against SMB header</p></dd><dt><span class="term">UINT16 result</span></dt><dd><p>result (0x00 = accept)</p></dd><dt><span class="term">UINT16 reason</span></dt><dd><p>reason (0x00 = no reason specified)</p></dd><dt><span class="term">* transfersyntax USE RPC_Iface</span></dt><dd><p>the transfer syntax from the request</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553464"></a>RPC_ReqNorm RW</h4></div></div></div><p>the remainder of the packet after the header for every other other request</p><div class="variablelist"><dl><dt><span class="term">UINT32 allochint</span></dt><dd><p>the size of the stub data in bytes</p></dd><dt><span class="term">UINT16 prescontext</span></dt><dd><p>presentation context identifier (0x0)</p></dd><dt><span class="term">UINT16 opnum</span></dt><dd><p>operation number (0x15)</p></dd><dt><span class="term">* stub USE TvPacket</span></dt><dd><p>a packet dependent on the pipe name (probably the interface) and the op number)</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553519"></a>RPC_ResNorm RW</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32 allochint</span></dt><dd><p># size of the stub data in bytes</p></dd><dt><span class="term">UINT16 prescontext</span></dt><dd><p># presentation context identifier (same as request)</p></dd><dt><span class="term">UINT8 cancelcount</span></dt><dd><p># cancel count? (0x0)</p></dd><dt><span class="term">UINT8 reserved</span></dt><dd><p># 0 - one byte padding</p></dd><dt><span class="term">* stub USE TvPacket</span></dt><dd><p># the remainder of the reply</p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553580"></a>Tail</h3></div></div></div><p>The end of each of the NTLSA and NETLOGON named pipes ends with:</p><div class="variablelist"><dl><dt><span class="term">......</span></dt><dd><p>end of data</p></dd><dt><span class="term">UINT32</span></dt><dd><p>return code</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553616"></a>RPC Bind / Bind Ack</h3></div></div></div><p> RPC Binds are the process of associating an RPC pipe (e.g \PIPE\lsarpc) with a "transfer syntax" (see RPC_Iface structure). The purpose for doing this is unknown. @@ -133,7 +133,7 @@ this is unknown. returned by the SMBopenX Transact response.</em></span></p><p><span class="emphasis"><em>Note: The RPC_ResBind members maxtsize, maxrsize and assocgid are the same in the response as the same members in the RPC_ReqBind. The RPC_ResBind member transfersyntax is the same in the response as the</em></span></p><p><span class="emphasis"><em>Note: The RPC_ResBind response member secondaddr contains the name of what is presumed to be the service behind the RPC pipe. The - mapping identified so far is:</em></span></p><div class="variablelist"><dl><dt><span class="term">initial SMBopenX request:</span></dt><dd><p>RPC_ResBind response:</p></dd><dt><span class="term">"\\PIPE\\srvsvc"</span></dt><dd><p>"\\PIPE\\ntsvcs"</p></dd><dt><span class="term">"\\PIPE\\samr"</span></dt><dd><p>"\\PIPE\\lsass"</p></dd><dt><span class="term">"\\PIPE\\lsarpc"</span></dt><dd><p>"\\PIPE\\lsass"</p></dd><dt><span class="term">"\\PIPE\\wkssvc"</span></dt><dd><p>"\\PIPE\\wksvcs"</p></dd><dt><span class="term">"\\PIPE\\NETLOGON"</span></dt><dd><p>"\\PIPE\\NETLOGON"</p></dd></dl></div><p><span class="emphasis"><em>Note: The RPC_Packet fraglength member in both the Bind Request and Bind Acknowledgment must contain the length of the entire RPC data, including the RPC_Packet header.</em></span></p><p>Request:</p><table border="0" summary="Simple list" class="simplelist"><tr><td>RPC_Packet</td></tr><tr><td>RPC_ReqBind</td></tr></table><p>Response:</p><table border="0" summary="Simple list" class="simplelist"><tr><td>RPC_Packet</td></tr><tr><td>RPC_ResBind</td></tr></table></div><div class="sect2" title="NTLSA Transact Named Pipe"><div class="titlepage"><div><div><h3 class="title"><a name="id2559827"></a>NTLSA Transact Named Pipe</h3></div></div></div><p>The sequence of actions taken on this pipe are:</p><table border="0" summary="Simple list" class="simplelist"><tr><td>Establish a connection to the IPC$ share (SMBtconX). use encrypted passwords.</td></tr><tr><td>Open an RPC Pipe with the name "\\PIPE\\lsarpc". Store the file handle.</td></tr><tr><td>Using the file handle, send a Set Named Pipe Handle state to 0x4300.</td></tr><tr><td>Send an LSA Open Policy request. Store the Policy Handle.</td></tr><tr><td>Using the Policy Handle, send LSA Query Info Policy requests, etc.</td></tr><tr><td>Using the Policy Handle, send an LSA Close.</td></tr><tr><td>Close the IPC$ share.</td></tr></table><p>Defines for this pipe, identifying the query are:</p><div class="variablelist"><dl><dt><span class="term">LSA Open Policy:</span></dt><dd><p>0x2c</p></dd><dt><span class="term">LSA Query Info Policy:</span></dt><dd><p>0x07</p></dd><dt><span class="term">LSA Enumerate Trusted Domains:</span></dt><dd><p>0x0d</p></dd><dt><span class="term">LSA Open Secret:</span></dt><dd><p>0xff</p></dd><dt><span class="term">LSA Lookup SIDs:</span></dt><dd><p>0xfe</p></dd><dt><span class="term">LSA Lookup Names:</span></dt><dd><p>0xfd</p></dd><dt><span class="term">LSA Close:</span></dt><dd><p>0x00</p></dd></dl></div></div><div class="sect2" title="LSA Open Policy"><div class="titlepage"><div><div><h3 class="title"><a name="id2559955"></a>LSA Open Policy</h3></div></div></div><p><span class="emphasis"><em>Note: The policy handle can be anything you like.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2559965"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>server name - unicode string starting with two '\'s</p></dd><dt><span class="term">OBJ_ATTR</span></dt><dd><p>object attributes</p></dd><dt><span class="term">UINT32</span></dt><dd><p>1 - desired access</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2560019"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>LSA policy handle</p></dd><dt><span class="term">return</span></dt><dd><p>0 - indicates success</p></dd></dl></div></div></div><div class="sect2" title="LSA Query Info Policy"><div class="titlepage"><div><div><h3 class="title"><a name="id2560051"></a>LSA Query Info Policy</h3></div></div></div><p><span class="emphasis"><em>Note: The info class in response must be the same as that in the request.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2560062"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>LSA policy handle</p></dd><dt><span class="term">UINT16</span></dt><dd><p>info class (also a policy handle?)</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2560091"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UINT16</span></dt><dd><p>info class (same as info class in request).</p></dd></dl></div><pre class="programlisting"> + mapping identified so far is:</em></span></p><div class="variablelist"><dl><dt><span class="term">initial SMBopenX request:</span></dt><dd><p>RPC_ResBind response:</p></dd><dt><span class="term">"\\PIPE\\srvsvc"</span></dt><dd><p>"\\PIPE\\ntsvcs"</p></dd><dt><span class="term">"\\PIPE\\samr"</span></dt><dd><p>"\\PIPE\\lsass"</p></dd><dt><span class="term">"\\PIPE\\lsarpc"</span></dt><dd><p>"\\PIPE\\lsass"</p></dd><dt><span class="term">"\\PIPE\\wkssvc"</span></dt><dd><p>"\\PIPE\\wksvcs"</p></dd><dt><span class="term">"\\PIPE\\NETLOGON"</span></dt><dd><p>"\\PIPE\\NETLOGON"</p></dd></dl></div><p><span class="emphasis"><em>Note: The RPC_Packet fraglength member in both the Bind Request and Bind Acknowledgment must contain the length of the entire RPC data, including the RPC_Packet header.</em></span></p><p>Request:</p><table class="simplelist" border="0" summary="Simple list"><tr><td>RPC_Packet</td></tr><tr><td>RPC_ReqBind</td></tr></table><p>Response:</p><table class="simplelist" border="0" summary="Simple list"><tr><td>RPC_Packet</td></tr><tr><td>RPC_ResBind</td></tr></table></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553755"></a>NTLSA Transact Named Pipe</h3></div></div></div><p>The sequence of actions taken on this pipe are:</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Establish a connection to the IPC$ share (SMBtconX). use encrypted passwords.</td></tr><tr><td>Open an RPC Pipe with the name "\\PIPE\\lsarpc". Store the file handle.</td></tr><tr><td>Using the file handle, send a Set Named Pipe Handle state to 0x4300.</td></tr><tr><td>Send an LSA Open Policy request. Store the Policy Handle.</td></tr><tr><td>Using the Policy Handle, send LSA Query Info Policy requests, etc.</td></tr><tr><td>Using the Policy Handle, send an LSA Close.</td></tr><tr><td>Close the IPC$ share.</td></tr></table><p>Defines for this pipe, identifying the query are:</p><div class="variablelist"><dl><dt><span class="term">LSA Open Policy:</span></dt><dd><p>0x2c</p></dd><dt><span class="term">LSA Query Info Policy:</span></dt><dd><p>0x07</p></dd><dt><span class="term">LSA Enumerate Trusted Domains:</span></dt><dd><p>0x0d</p></dd><dt><span class="term">LSA Open Secret:</span></dt><dd><p>0xff</p></dd><dt><span class="term">LSA Lookup SIDs:</span></dt><dd><p>0xfe</p></dd><dt><span class="term">LSA Lookup Names:</span></dt><dd><p>0xfd</p></dd><dt><span class="term">LSA Close:</span></dt><dd><p>0x00</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553883"></a>LSA Open Policy</h3></div></div></div><p><span class="emphasis"><em>Note: The policy handle can be anything you like.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553893"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>server name - unicode string starting with two '\'s</p></dd><dt><span class="term">OBJ_ATTR</span></dt><dd><p>object attributes</p></dd><dt><span class="term">UINT32</span></dt><dd><p>1 - desired access</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553946"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>LSA policy handle</p></dd><dt><span class="term">return</span></dt><dd><p>0 - indicates success</p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553978"></a>LSA Query Info Policy</h3></div></div></div><p><span class="emphasis"><em>Note: The info class in response must be the same as that in the request.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2553989"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>LSA policy handle</p></dd><dt><span class="term">UINT16</span></dt><dd><p>info class (also a policy handle?)</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554019"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UINT16</span></dt><dd><p>info class (same as info class in request).</p></dd></dl></div><pre class="programlisting"> switch (info class) case 3: case 5: @@ -142,11 +142,11 @@ DOM_INFO domain info, levels 3 and 5 (are the same). } return 0 - indicates success -</pre></div></div><div class="sect2" title="LSA Enumerate Trusted Domains"><div class="titlepage"><div><div><h3 class="title"><a name="id2560132"></a>LSA Enumerate Trusted Domains</h3></div></div></div><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2560138"></a>Request</h4></div></div></div><p>no extra data</p></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2560148"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>0 - enumeration context</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - entries read</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - trust information</p></dd><dt><span class="term">return</span></dt><dd><p>0x8000 001a - "no trusted domains" success code</p></dd></dl></div></div></div><div class="sect2" title="LSA Open Secret"><div class="titlepage"><div><div><h3 class="title"><a name="id2560202"></a>LSA Open Secret</h3></div></div></div><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2560208"></a>Request</h4></div></div></div><p>no extra data</p></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2560217"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd></dl></div><p>return 0x0C00 0034 - "no such secret" success code</p></div></div><div class="sect2" title="LSA Close"><div class="titlepage"><div><div><h3 class="title"><a name="id2560285"></a>LSA Close</h3></div></div></div><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2560291"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>policy handle to be closed</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2560311"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>0s - closed policy handle (all zeros)</p></dd></dl></div><p>return 0 - indicates success</p></div></div><div class="sect2" title="LSA Lookup SIDS"><div class="titlepage"><div><div><h3 class="title"><a name="id2560336"></a>LSA Lookup SIDS</h3></div></div></div><p><span class="emphasis"><em>Note: num_entries in response must be same as num_entries in request.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2560347"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>LSA policy handle</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain SID buffer pointer</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain name buffer pointer</p></dd><dt><span class="term">VOID*[num_entries] undocumented domain SID pointers to be looked up. -</span></dt><dd><p>DOM_SID[num_entries] domain SIDs to be looked up.</p></dd><dt><span class="term">char[16]</span></dt><dd><p>completely undocumented 16 bytes.</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2560424"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">DOM_REF</span></dt><dd><p>domain reference response</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd><dt><span class="term">DOM_SID2[num_entries]</span></dt><dd><p>domain SIDs (from Request, listed above).</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd></dl></div><p>return 0 - indicates success</p></div></div><div class="sect2" title="LSA Lookup Names"><div class="titlepage"><div><div><h3 class="title"><a name="id2560497"></a>LSA Lookup Names</h3></div></div></div><p><span class="emphasis"><em>Note: num_entries in response must be same as num_entries in request.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2560508"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>LSA policy handle</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain SID buffer pointer</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain name buffer pointer</p></dd><dt><span class="term">NAME[num_entries]</span></dt><dd><p>names to be looked up.</p></dd><dt><span class="term">char[]</span></dt><dd><p>undocumented bytes - falsely translated SID structure?</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2560595"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">DOM_REF</span></dt><dd><p>domain reference response</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd><dt><span class="term">DOM_RID[num_entries]</span></dt><dd><p>domain SIDs (from Request, listed above).</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd></dl></div><p>return 0 - indicates success</p></div></div></div><div class="sect1" title="NETLOGON rpc Transact Named Pipe"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2560669"></a>NETLOGON rpc Transact Named Pipe</h2></div></div></div><p>The sequence of actions taken on this pipe are:</p><table border="0" summary="Simple list" class="simplelist"><tr><td>tablish a connection to the IPC$ share (SMBtconX). use encrypted passwords.</td></tr><tr><td>en an RPC Pipe with the name "\\PIPE\\NETLOGON". Store the file handle.</td></tr><tr><td>ing the file handle, send a Set Named Pipe Handle state to 0x4300.</td></tr><tr><td>eate Client Challenge. Send LSA Request Challenge. Store Server Challenge.</td></tr><tr><td>lculate Session Key. Send an LSA Auth 2 Challenge. Store Auth2 Challenge.</td></tr><tr><td>lc/Verify Client Creds. Send LSA Srv PW Set. Calc/Verify Server Creds.</td></tr><tr><td>lc/Verify Client Creds. Send LSA SAM Logon . Calc/Verify Server Creds.</td></tr><tr><td>lc/Verify Client Creds. Send LSA SAM Logoff. Calc/Verify Server Creds.</td></tr><tr><td>ose the IPC$ share.</td></tr></table><p>Defines for this pipe, identifying the query are</p><div class="variablelist"><dl><dt><span class="term">LSA Request Challenge:</span></dt><dd><p>0x04</p></dd><dt><span class="term">LSA Server Password Set:</span></dt><dd><p>0x06</p></dd><dt><span class="term">LSA SAM Logon:</span></dt><dd><p>0x02</p></dd><dt><span class="term">LSA SAM Logoff:</span></dt><dd><p>0x03</p></dd><dt><span class="term">LSA Auth 2:</span></dt><dd><p>0x0f</p></dd><dt><span class="term">LSA Logon Control:</span></dt><dd><p>0x0e</p></dd></dl></div><div class="sect2" title="LSA Request Challenge"><div class="titlepage"><div><div><h3 class="title"><a name="id2560795"></a>LSA Request Challenge</h3></div></div></div><p><span class="emphasis"><em>Note: logon server name starts with two '\' characters and is upper case.</em></span></p><p><span class="emphasis"><em>Note: logon client is the machine, not the user.</em></span></p><p><span class="emphasis"><em>Note: the initial LanManager password hash, against which the challenge is issued, is the machine name itself (lower case). there will becalls issued (LSA Server Password Set) which will change this, later. refusing these calls allows you to always deal with the same password (i.e the LM# of the machine name in lower case).</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2560827"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon server unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon client unicode string</p></dd><dt><span class="term">char[8]</span></dt><dd><p>client challenge</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2560879"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">char[8]</span></dt><dd><p>server challenge</p></dd></dl></div><p>return 0 - indicates success</p></div></div><div class="sect2" title="LSA Authenticate 2"><div class="titlepage"><div><div><h3 class="title"><a name="id2560904"></a>LSA Authenticate 2</h3></div></div></div><p><span class="emphasis"><em>Note: in between request and response, calculate the client credentials, and check them against the client-calculated credentials (this process uses the previously received client credentials).</em></span></p><p><span class="emphasis"><em>Note: neg_flags in the response is the same as that in the request.</em></span></p><p><span class="emphasis"><em>Note: you must take a copy of the client-calculated credentials received here, because they will be used in subsequent authentication packets.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2560929"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">LOG_INFO</span></dt><dd><p>client identification info</p></dd><dt><span class="term">char[8]</span></dt><dd><p>client-calculated credentials</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to 4-byte align with start of SMB header.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>neg_flags - negotiated flags (usual value is 0x0000 01ff)</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2560982"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">char[8]</span></dt><dd><p>server credentials.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>neg_flags - same as neg_flags in request.</p></dd></dl></div><p>return 0 - indicates success. failure value unknown.</p></div></div><div class="sect2" title="LSA Server Password Set"><div class="titlepage"><div><div><h3 class="title"><a name="id2561019"></a>LSA Server Password Set</h3></div></div></div><p><span class="emphasis"><em>Note: the new password is suspected to be a DES encryption using the old password to generate the key.</em></span></p><p><span class="emphasis"><em>Note: in between request and response, calculate the client credentials, and check them against the client-calculated credentials (this process uses the previously received client credentials).</em></span></p><p><span class="emphasis"><em>Note: the server credentials are constructed from the client-calculated credentials and the client time + 1 second.</em></span></p><p><span class="emphasis"><em>Note: you must take a copy of the client-calculated credentials received here, because they will be used in subsequent authentication packets.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2561051"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">CLNT_INFO</span></dt><dd><p>client identification/authentication info</p></dd><dt><span class="term">char[]</span></dt><dd><p>new password - undocumented.</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2561084"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">CREDS</span></dt><dd><p>server credentials. server time stamp appears to be ignored.</p></dd></dl></div><p>return 0 - indicates success; 0xC000 006a indicates failure</p></div></div><div class="sect2" title="LSA SAM Logon"><div class="titlepage"><div><div><h3 class="title"><a name="id2561111"></a>LSA SAM Logon</h3></div></div></div><p><span class="emphasis"><em> +</pre></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2554060"></a>LSA Enumerate Trusted Domains</h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554066"></a>Request</h4></div></div></div><p>no extra data</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554076"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>0 - enumeration context</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - entries read</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - trust information</p></dd><dt><span class="term">return</span></dt><dd><p>0x8000 001a - "no trusted domains" success code</p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2554130"></a>LSA Open Secret</h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554135"></a>Request</h4></div></div></div><p>no extra data</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554145"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd><dt><span class="term">UINT32</span></dt><dd><p>0 - undocumented</p></dd></dl></div><p>return 0x0C00 0034 - "no such secret" success code</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2554213"></a>LSA Close</h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554218"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>policy handle to be closed</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554239"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>0s - closed policy handle (all zeros)</p></dd></dl></div><p>return 0 - indicates success</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2554264"></a>LSA Lookup SIDS</h3></div></div></div><p><span class="emphasis"><em>Note: num_entries in response must be same as num_entries in request.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554275"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>LSA policy handle</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain SID buffer pointer</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain name buffer pointer</p></dd><dt><span class="term">VOID*[num_entries] undocumented domain SID pointers to be looked up. +</span></dt><dd><p>DOM_SID[num_entries] domain SIDs to be looked up.</p></dd><dt><span class="term">char[16]</span></dt><dd><p>completely undocumented 16 bytes.</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554352"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">DOM_REF</span></dt><dd><p>domain reference response</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd><dt><span class="term">DOM_SID2[num_entries]</span></dt><dd><p>domain SIDs (from Request, listed above).</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd></dl></div><p>return 0 - indicates success</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2554425"></a>LSA Lookup Names</h3></div></div></div><p><span class="emphasis"><em>Note: num_entries in response must be same as num_entries in request.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554436"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">POL_HND</span></dt><dd><p>LSA policy handle</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain SID buffer pointer</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented domain name buffer pointer</p></dd><dt><span class="term">NAME[num_entries]</span></dt><dd><p>names to be looked up.</p></dd><dt><span class="term">char[]</span></dt><dd><p>undocumented bytes - falsely translated SID structure?</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554523"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">DOM_REF</span></dt><dd><p>domain reference response</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd><dt><span class="term">DOM_RID[num_entries]</span></dt><dd><p>domain SIDs (from Request, listed above).</p></dd><dt><span class="term">UINT32</span></dt><dd><p>num_entries (listed above)</p></dd></dl></div><p>return 0 - indicates success</p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2554597"></a>NETLOGON rpc Transact Named Pipe</h2></div></div></div><p>The sequence of actions taken on this pipe are:</p><table class="simplelist" border="0" summary="Simple list"><tr><td>tablish a connection to the IPC$ share (SMBtconX). use encrypted passwords.</td></tr><tr><td>en an RPC Pipe with the name "\\PIPE\\NETLOGON". Store the file handle.</td></tr><tr><td>ing the file handle, send a Set Named Pipe Handle state to 0x4300.</td></tr><tr><td>eate Client Challenge. Send LSA Request Challenge. Store Server Challenge.</td></tr><tr><td>lculate Session Key. Send an LSA Auth 2 Challenge. Store Auth2 Challenge.</td></tr><tr><td>lc/Verify Client Creds. Send LSA Srv PW Set. Calc/Verify Server Creds.</td></tr><tr><td>lc/Verify Client Creds. Send LSA SAM Logon . Calc/Verify Server Creds.</td></tr><tr><td>lc/Verify Client Creds. Send LSA SAM Logoff. Calc/Verify Server Creds.</td></tr><tr><td>ose the IPC$ share.</td></tr></table><p>Defines for this pipe, identifying the query are</p><div class="variablelist"><dl><dt><span class="term">LSA Request Challenge:</span></dt><dd><p>0x04</p></dd><dt><span class="term">LSA Server Password Set:</span></dt><dd><p>0x06</p></dd><dt><span class="term">LSA SAM Logon:</span></dt><dd><p>0x02</p></dd><dt><span class="term">LSA SAM Logoff:</span></dt><dd><p>0x03</p></dd><dt><span class="term">LSA Auth 2:</span></dt><dd><p>0x0f</p></dd><dt><span class="term">LSA Logon Control:</span></dt><dd><p>0x0e</p></dd></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2554723"></a>LSA Request Challenge</h3></div></div></div><p><span class="emphasis"><em>Note: logon server name starts with two '\' characters and is upper case.</em></span></p><p><span class="emphasis"><em>Note: logon client is the machine, not the user.</em></span></p><p><span class="emphasis"><em>Note: the initial LanManager password hash, against which the challenge is issued, is the machine name itself (lower case). there will becalls issued (LSA Server Password Set) which will change this, later. refusing these calls allows you to always deal with the same password (i.e the LM# of the machine name in lower case).</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554754"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon server unicode string</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>logon client unicode string</p></dd><dt><span class="term">char[8]</span></dt><dd><p>client challenge</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554807"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">char[8]</span></dt><dd><p>server challenge</p></dd></dl></div><p>return 0 - indicates success</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2554832"></a>LSA Authenticate 2</h3></div></div></div><p><span class="emphasis"><em>Note: in between request and response, calculate the client credentials, and check them against the client-calculated credentials (this process uses the previously received client credentials).</em></span></p><p><span class="emphasis"><em>Note: neg_flags in the response is the same as that in the request.</em></span></p><p><span class="emphasis"><em>Note: you must take a copy of the client-calculated credentials received here, because they will be used in subsequent authentication packets.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554857"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">LOG_INFO</span></dt><dd><p>client identification info</p></dd><dt><span class="term">char[8]</span></dt><dd><p>client-calculated credentials</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to 4-byte align with start of SMB header.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>neg_flags - negotiated flags (usual value is 0x0000 01ff)</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554910"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">char[8]</span></dt><dd><p>server credentials.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>neg_flags - same as neg_flags in request.</p></dd></dl></div><p>return 0 - indicates success. failure value unknown.</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2554947"></a>LSA Server Password Set</h3></div></div></div><p><span class="emphasis"><em>Note: the new password is suspected to be a DES encryption using the old password to generate the key.</em></span></p><p><span class="emphasis"><em>Note: in between request and response, calculate the client credentials, and check them against the client-calculated credentials (this process uses the previously received client credentials).</em></span></p><p><span class="emphasis"><em>Note: the server credentials are constructed from the client-calculated credentials and the client time + 1 second.</em></span></p><p><span class="emphasis"><em>Note: you must take a copy of the client-calculated credentials received here, because they will be used in subsequent authentication packets.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2554979"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">CLNT_INFO</span></dt><dd><p>client identification/authentication info</p></dd><dt><span class="term">char[]</span></dt><dd><p>new password - undocumented.</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555011"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">CREDS</span></dt><dd><p>server credentials. server time stamp appears to be ignored.</p></dd></dl></div><p>return 0 - indicates success; 0xC000 006a indicates failure</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2555038"></a>LSA SAM Logon</h3></div></div></div><p><span class="emphasis"><em> Note: valid_user is True iff the username and password hash are valid for the requested domain. -</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2561122"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">SAM_INFO</span></dt><dd><p>sam_id structure</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2561142"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">CREDS</span></dt><dd><p>server credentials. server time stamp appears to be ignored.</p></dd></dl></div><pre class="programlisting"> +</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555050"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">SAM_INFO</span></dt><dd><p>sam_id structure</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555070"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">CREDS</span></dt><dd><p>server credentials. server time stamp appears to be ignored.</p></dd></dl></div><pre class="programlisting"> if (valid_user) { UINT16 3 - switch value indicating USER_INFO structure. @@ -166,16 +166,16 @@ else return 0xC000 0064 - NT_STATUS_NO_SUCH_USER. } -</pre></div></div><div class="sect2" title="LSA SAM Logoff"><div class="titlepage"><div><div><h3 class="title"><a name="id2561190"></a>LSA SAM Logoff</h3></div></div></div><p><span class="emphasis"><em> +</pre></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2555118"></a>LSA SAM Logoff</h3></div></div></div><p><span class="emphasis"><em> Note: presumably, the SAM_INFO structure is validated, and a (currently undocumented) error code returned if the Logoff is invalid. -</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2561202"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">SAM_INFO</span></dt><dd><p>sam_id structure</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2561223"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">CREDS</span></dt><dd><p>server credentials. server time stamp appears to be ignored.</p></dd></dl></div><p>return 0 - indicates success. undocumented failure indication.</p></div></div></div><div class="sect1" title="\\MAILSLOT\NET\NTLOGON"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2561262"></a>\\MAILSLOT\NET\NTLOGON</h2></div></div></div><p><span class="emphasis"><em> +</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555130"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">SAM_INFO</span></dt><dd><p>sam_id structure</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555150"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>undocumented buffer pointer</p></dd><dt><span class="term">CREDS</span></dt><dd><p>server credentials. server time stamp appears to be ignored.</p></dd></dl></div><p>return 0 - indicates success. undocumented failure indication.</p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2555189"></a>\\MAILSLOT\NET\NTLOGON</h2></div></div></div><p><span class="emphasis"><em> Note: mailslots will contain a response mailslot, to which the response should be sent. the target NetBIOS name is REQUEST_NAME<20>, where REQUEST_NAME is the name of the machine that sent the request. -</em></span></p><div class="sect2" title="Query for PDC"><div class="titlepage"><div><div><h3 class="title"><a name="id2561276"></a>Query for PDC</h3></div></div></div><p><span class="emphasis"><em>Note: NTversion, LMNTtoken, LM20token in response are the same as those given in the request.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2561287"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>0x0007 - Query for PDC</p></dd><dt><span class="term">STR</span></dt><dd><p>machine name</p></dd><dt><span class="term">STR</span></dt><dd><p>response mailslot</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to 2-byte align with start of mailslot.</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>machine name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>NTversion</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LMNTtoken</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LM20token</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2561383"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>0x000A - Respose to Query for PDC</p></dd><dt><span class="term">STR</span></dt><dd><p>machine name (in uppercase)</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to 2-byte align with start of mailslot.</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>machine name</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>domain name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>NTversion (same as received in request)</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LMNTtoken (same as received in request)</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LM20token (same as received in request)</p></dd></dl></div></div></div><div class="sect2" title="SAM Logon"><div class="titlepage"><div><div><h3 class="title"><a name="id2561476"></a>SAM Logon</h3></div></div></div><p><span class="emphasis"><em>Note: machine name in response is preceded by two '\' characters.</em></span></p><p><span class="emphasis"><em>Note: NTversion, LMNTtoken, LM20token in response are the same as those given in the request.</em></span></p><p><span class="emphasis"><em>Note: user name in the response is presumably the same as that in the request.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2561499"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>0x0012 - SAM Logon</p></dd><dt><span class="term">UINT16</span></dt><dd><p>request count</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>machine name</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>user name</p></dd><dt><span class="term">STR</span></dt><dd><p>response mailslot</p></dd><dt><span class="term">UINT32</span></dt><dd><p>alloweable account</p></dd><dt><span class="term">UINT32</span></dt><dd><p>domain SID size</p></dd><dt><span class="term">char[sid_size]</span></dt><dd><p>domain SID, of sid_size bytes.</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>???? padding to 4? 2? -byte align with start of mailslot.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>NTversion</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LMNTtoken</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LM20token</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2561638"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>0x0013 - Response to SAM Logon</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>machine name</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>user name - workstation trust account</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>domain name </p></dd><dt><span class="term">UINT32</span></dt><dd><p>NTversion</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LMNTtoken</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LM20token</p></dd></dl></div></div></div></div><div class="sect1" title="SRVSVC Transact Named Pipe"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2561726"></a>SRVSVC Transact Named Pipe</h2></div></div></div><p>Defines for this pipe, identifying the query are:</p><div class="variablelist"><dl><dt><span class="term">Net Share Enum</span></dt><dd><p>0x0f</p></dd><dt><span class="term">Net Server Get Info</span></dt><dd><p>0x15</p></dd></dl></div><div class="sect2" title="Net Share Enum"><div class="titlepage"><div><div><h3 class="title"><a name="id2561760"></a>Net Share Enum</h3></div></div></div><p><span class="emphasis"><em>Note: share level and switch value in the response are presumably the same as those in the request.</em></span></p><p><span class="emphasis"><em>Note: cifsrap2.txt (section 5) may be of limited assistance here.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2561777"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>pointer (to server name?)</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>server name</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to get unicode string 4-byte aligned with the start of the SMB header.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>share level</p></dd><dt><span class="term">UINT32</span></dt><dd><p>switch value</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to SHARE_INFO_1_CTR</p></dd><dt><span class="term">SHARE_INFO_1_CTR</span></dt><dd><p>share info with 0 entries</p></dd><dt><span class="term">UINT32</span></dt><dd><p>preferred maximum length (0xffff ffff)</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2561872"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>share level</p></dd><dt><span class="term">UINT32</span></dt><dd><p>switch value</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to SHARE_INFO_1_CTR</p></dd><dt><span class="term">SHARE_INFO_1_CTR</span></dt><dd><p>share info (only added if share info ptr is non-zero)</p></dd></dl></div><p>return 0 - indicates success</p></div></div><div class="sect2" title="Net Server Get Info"><div class="titlepage"><div><div><h3 class="title"><a name="id2561928"></a>Net Server Get Info</h3></div></div></div><p><span class="emphasis"><em>Note: level is the same value as in the request.</em></span></p><div class="sect3" title="Request"><div class="titlepage"><div><div><h4 class="title"><a name="id2561939"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UNISTR2</span></dt><dd><p>server name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>switch level</p></dd></dl></div></div><div class="sect3" title="Response"><div class="titlepage"><div><div><h4 class="title"><a name="id2561970"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>switch level</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to SERVER_INFO_101</p></dd><dt><span class="term">SERVER_INFO_101</span></dt><dd><p>server info (only added if server info ptr is non-zero)</p></dd></dl></div><p>return 0 - indicates success</p></div></div></div><div class="sect1" title="Cryptographic side of NT Domain Authentication"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562018"></a>Cryptographic side of NT Domain Authentication</h2></div></div></div><div class="sect2" title="Definitions"><div class="titlepage"><div><div><h3 class="title"><a name="id2562024"></a>Definitions</h3></div></div></div><div class="variablelist"><dl><dt><span class="term">Add(A1,A2)</span></dt><dd><p>Intel byte ordered addition of corresponding 4 byte words in arrays A1 and A2</p></dd><dt><span class="term">E(K,D)</span></dt><dd><p>DES ECB encryption of 8 byte data D using 7 byte key K</p></dd><dt><span class="term">lmowf()</span></dt><dd><p>Lan man hash</p></dd><dt><span class="term">ntowf()</span></dt><dd><p>NT hash</p></dd><dt><span class="term">PW</span></dt><dd><p>md4(machine_password) == md4(lsadump $machine.acc) == +</em></span></p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2555203"></a>Query for PDC</h3></div></div></div><p><span class="emphasis"><em>Note: NTversion, LMNTtoken, LM20token in response are the same as those given in the request.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555215"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>0x0007 - Query for PDC</p></dd><dt><span class="term">STR</span></dt><dd><p>machine name</p></dd><dt><span class="term">STR</span></dt><dd><p>response mailslot</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to 2-byte align with start of mailslot.</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>machine name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>NTversion</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LMNTtoken</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LM20token</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555311"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>0x000A - Respose to Query for PDC</p></dd><dt><span class="term">STR</span></dt><dd><p>machine name (in uppercase)</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to 2-byte align with start of mailslot.</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>machine name</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>domain name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>NTversion (same as received in request)</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LMNTtoken (same as received in request)</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LM20token (same as received in request)</p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2555404"></a>SAM Logon</h3></div></div></div><p><span class="emphasis"><em>Note: machine name in response is preceded by two '\' characters.</em></span></p><p><span class="emphasis"><em>Note: NTversion, LMNTtoken, LM20token in response are the same as those given in the request.</em></span></p><p><span class="emphasis"><em>Note: user name in the response is presumably the same as that in the request.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555427"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>0x0012 - SAM Logon</p></dd><dt><span class="term">UINT16</span></dt><dd><p>request count</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>machine name</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>user name</p></dd><dt><span class="term">STR</span></dt><dd><p>response mailslot</p></dd><dt><span class="term">UINT32</span></dt><dd><p>alloweable account</p></dd><dt><span class="term">UINT32</span></dt><dd><p>domain SID size</p></dd><dt><span class="term">char[sid_size]</span></dt><dd><p>domain SID, of sid_size bytes.</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>???? padding to 4? 2? -byte align with start of mailslot.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>NTversion</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LMNTtoken</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LM20token</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555566"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT16</span></dt><dd><p>0x0013 - Response to SAM Logon</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>machine name</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>user name - workstation trust account</p></dd><dt><span class="term">UNISTR</span></dt><dd><p>domain name </p></dd><dt><span class="term">UINT32</span></dt><dd><p>NTversion</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LMNTtoken</p></dd><dt><span class="term">UINT16</span></dt><dd><p>LM20token</p></dd></dl></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2555654"></a>SRVSVC Transact Named Pipe</h2></div></div></div><p>Defines for this pipe, identifying the query are:</p><div class="variablelist"><dl><dt><span class="term">Net Share Enum</span></dt><dd><p>0x0f</p></dd><dt><span class="term">Net Server Get Info</span></dt><dd><p>0x15</p></dd></dl></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2555688"></a>Net Share Enum</h3></div></div></div><p><span class="emphasis"><em>Note: share level and switch value in the response are presumably the same as those in the request.</em></span></p><p><span class="emphasis"><em>Note: cifsrap2.txt (section 5) may be of limited assistance here.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555705"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">VOID*</span></dt><dd><p>pointer (to server name?)</p></dd><dt><span class="term">UNISTR2</span></dt><dd><p>server name</p></dd><dt><span class="term">UINT8[]</span></dt><dd><p>padding to get unicode string 4-byte aligned with the start of the SMB header.</p></dd><dt><span class="term">UINT32</span></dt><dd><p>share level</p></dd><dt><span class="term">UINT32</span></dt><dd><p>switch value</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to SHARE_INFO_1_CTR</p></dd><dt><span class="term">SHARE_INFO_1_CTR</span></dt><dd><p>share info with 0 entries</p></dd><dt><span class="term">UINT32</span></dt><dd><p>preferred maximum length (0xffff ffff)</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555800"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>share level</p></dd><dt><span class="term">UINT32</span></dt><dd><p>switch value</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to SHARE_INFO_1_CTR</p></dd><dt><span class="term">SHARE_INFO_1_CTR</span></dt><dd><p>share info (only added if share info ptr is non-zero)</p></dd></dl></div><p>return 0 - indicates success</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2555856"></a>Net Server Get Info</h3></div></div></div><p><span class="emphasis"><em>Note: level is the same value as in the request.</em></span></p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555867"></a>Request</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UNISTR2</span></dt><dd><p>server name</p></dd><dt><span class="term">UINT32</span></dt><dd><p>switch level</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2555898"></a>Response</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">UINT32</span></dt><dd><p>switch level</p></dd><dt><span class="term">VOID*</span></dt><dd><p>pointer to SERVER_INFO_101</p></dd><dt><span class="term">SERVER_INFO_101</span></dt><dd><p>server info (only added if server info ptr is non-zero)</p></dd></dl></div><p>return 0 - indicates success</p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2555945"></a>Cryptographic side of NT Domain Authentication</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2555952"></a>Definitions</h3></div></div></div><div class="variablelist"><dl><dt><span class="term">Add(A1,A2)</span></dt><dd><p>Intel byte ordered addition of corresponding 4 byte words in arrays A1 and A2</p></dd><dt><span class="term">E(K,D)</span></dt><dd><p>DES ECB encryption of 8 byte data D using 7 byte key K</p></dd><dt><span class="term">lmowf()</span></dt><dd><p>Lan man hash</p></dd><dt><span class="term">ntowf()</span></dt><dd><p>NT hash</p></dd><dt><span class="term">PW</span></dt><dd><p>md4(machine_password) == md4(lsadump $machine.acc) == pwdump(machine$) (initially) == md4(lmowf(unicode(machine))) -</p></dd><dt><span class="term">ARC4(K,Lk,D,Ld)</span></dt><dd><p>ARC4 encryption of data D of length Ld with key K of length Lk</p></dd><dt><span class="term">v[m..n(,l)]</span></dt><dd><p>subset of v from bytes m to n, optionally padded with zeroes to length l</p></dd><dt><span class="term">Cred(K,D)</span></dt><dd><p>E(K[7..7,7],E(K[0..6],D)) computes a credential</p></dd><dt><span class="term">Time()</span></dt><dd><p>4 byte current time</p></dd><dt><span class="term">Cc,Cs</span></dt><dd><p>8 byte client and server challenges Rc,Rs: 8 byte client and server credentials</p></dd></dl></div></div><div class="sect2" title="Protocol"><div class="titlepage"><div><div><h3 class="title"><a name="id2562150"></a>Protocol</h3></div></div></div><pre class="programlisting"> +</p></dd><dt><span class="term">ARC4(K,Lk,D,Ld)</span></dt><dd><p>ARC4 encryption of data D of length Ld with key K of length Lk</p></dd><dt><span class="term">v[m..n(,l)]</span></dt><dd><p>subset of v from bytes m to n, optionally padded with zeroes to length l</p></dd><dt><span class="term">Cred(K,D)</span></dt><dd><p>E(K[7..7,7],E(K[0..6],D)) computes a credential</p></dd><dt><span class="term">Time()</span></dt><dd><p>4 byte current time</p></dd><dt><span class="term">Cc,Cs</span></dt><dd><p>8 byte client and server challenges Rc,Rs: 8 byte client and server credentials</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2556077"></a>Protocol</h3></div></div></div><pre class="programlisting"> C->S ReqChal,Cc S->C Cs </pre><pre class="programlisting"> @@ -211,7 +211,7 @@ S: Ts = Time() S->C Cred(Ks,Cred(Ks,Rc+Tc+1)),userinfo(logon script,UID,SIDs,etc) C: assert(Rs == Cred(Ks,Cred(Rc+Tc+1)) C: Rc = Cred(Ks,Rc+Tc+1) -</pre></div><div class="sect2" title="Comments"><div class="titlepage"><div><div><h3 class="title"><a name="id2562229"></a>Comments</h3></div></div></div><p> +</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2556156"></a>Comments</h3></div></div></div><p> On first joining the domain the session key could be computed by anyone listening in on the network as the machine password has a well known value. Until the machine is rebooted it will use this session @@ -232,15 +232,15 @@ returned by the server. The password OWFs should NOT be sent over the network reversibly encrypted. They should be sent using ARC4(Ks,md4(owf)) with the server computing the same function using the owf values in the SAM. -</p></div></div><div class="sect1" title="SIDs and RIDs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2562270"></a>SIDs and RIDs</h2></div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556198"></a>SIDs and RIDs</h2></div></div></div><p> SIDs and RIDs are well documented elsewhere. </p><p> A SID is an NT Security ID (see DOM_SID structure). They are of the form: -</p><table border="0" summary="Simple list" class="simplelist"><tr><td>revision-NN-SubAuth1-SubAuth2-SubAuth3... </td></tr><tr><td>revision-0xNNNNNNNNNNNN-SubAuth1-SubAuth2-SubAuth3...</td></tr></table><p> +</p><table class="simplelist" border="0" summary="Simple list"><tr><td>revision-NN-SubAuth1-SubAuth2-SubAuth3... </td></tr><tr><td>revision-0xNNNNNNNNNNNN-SubAuth1-SubAuth2-SubAuth3...</td></tr></table><p> currently, the SID revision is 1. The Sub-Authorities are known as Relative IDs (RIDs). -</p><div class="sect2" title="Well-known SIDs"><div class="titlepage"><div><div><h3 class="title"><a name="id2562302"></a>Well-known SIDs</h3></div></div></div><div class="sect3" title="Universal well-known SIDs"><div class="titlepage"><div><div><h4 class="title"><a name="id2562308"></a>Universal well-known SIDs</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">Null SID</span></dt><dd><p>S-1-0-0</p></dd><dt><span class="term">World</span></dt><dd><p>S-1-1-0</p></dd><dt><span class="term">Local</span></dt><dd><p>S-1-2-0</p></dd><dt><span class="term">Creator Owner ID</span></dt><dd><p>S-1-3-0</p></dd><dt><span class="term">Creator Group ID</span></dt><dd><p>S-1-3-1</p></dd><dt><span class="term">Creator Owner Server ID</span></dt><dd><p>S-1-3-2</p></dd><dt><span class="term">Creator Group Server ID</span></dt><dd><p>S-1-3-3</p></dd><dt><span class="term">(Non-unique IDs)</span></dt><dd><p>S-1-4</p></dd></dl></div></div><div class="sect3" title="NT well-known SIDs"><div class="titlepage"><div><div><h4 class="title"><a name="id2562403"></a>NT well-known SIDs</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">NT Authority</span></dt><dd><p>S-1-5</p></dd><dt><span class="term">Dialup</span></dt><dd><p>S-1-5-1</p></dd><dt><span class="term">Network</span></dt><dd><p>S-1-5-2</p></dd><dt><span class="term">Batch</span></dt><dd><p>S-1-5-3</p></dd><dt><span class="term">Interactive</span></dt><dd><p>S-1-5-4</p></dd><dt><span class="term">Service</span></dt><dd><p>S-1-5-6</p></dd><dt><span class="term">AnonymousLogon(aka null logon session)</span></dt><dd><p>S-1-5-7</p></dd><dt><span class="term">Proxy</span></dt><dd><p>S-1-5-8</p></dd><dt><span class="term">ServerLogon(aka domain controller account)</span></dt><dd><p>S-1-5-8</p></dd><dt><span class="term">(Logon IDs)</span></dt><dd><p>S-1-5-5-X-Y</p></dd><dt><span class="term">(NT non-unique IDs)</span></dt><dd><p>S-1-5-0x15-...</p></dd><dt><span class="term">(Built-in domain)</span></dt><dd><p>s-1-5-0x20</p></dd></dl></div></div></div><div class="sect2" title="Well-known RIDS"><div class="titlepage"><div><div><h3 class="title"><a name="id2562541"></a>Well-known RIDS</h3></div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2556230"></a>Well-known SIDs</h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2556235"></a>Universal well-known SIDs</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">Null SID</span></dt><dd><p>S-1-0-0</p></dd><dt><span class="term">World</span></dt><dd><p>S-1-1-0</p></dd><dt><span class="term">Local</span></dt><dd><p>S-1-2-0</p></dd><dt><span class="term">Creator Owner ID</span></dt><dd><p>S-1-3-0</p></dd><dt><span class="term">Creator Group ID</span></dt><dd><p>S-1-3-1</p></dd><dt><span class="term">Creator Owner Server ID</span></dt><dd><p>S-1-3-2</p></dd><dt><span class="term">Creator Group Server ID</span></dt><dd><p>S-1-3-3</p></dd><dt><span class="term">(Non-unique IDs)</span></dt><dd><p>S-1-4</p></dd></dl></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2556330"></a>NT well-known SIDs</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">NT Authority</span></dt><dd><p>S-1-5</p></dd><dt><span class="term">Dialup</span></dt><dd><p>S-1-5-1</p></dd><dt><span class="term">Network</span></dt><dd><p>S-1-5-2</p></dd><dt><span class="term">Batch</span></dt><dd><p>S-1-5-3</p></dd><dt><span class="term">Interactive</span></dt><dd><p>S-1-5-4</p></dd><dt><span class="term">Service</span></dt><dd><p>S-1-5-6</p></dd><dt><span class="term">AnonymousLogon(aka null logon session)</span></dt><dd><p>S-1-5-7</p></dd><dt><span class="term">Proxy</span></dt><dd><p>S-1-5-8</p></dd><dt><span class="term">ServerLogon(aka domain controller account)</span></dt><dd><p>S-1-5-8</p></dd><dt><span class="term">(Logon IDs)</span></dt><dd><p>S-1-5-5-X-Y</p></dd><dt><span class="term">(NT non-unique IDs)</span></dt><dd><p>S-1-5-0x15-...</p></dd><dt><span class="term">(Built-in domain)</span></dt><dd><p>s-1-5-0x20</p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2556468"></a>Well-known RIDS</h3></div></div></div><p> A RID is a sub-authority value, as part of either a SID, or in the case of Group RIDs, part of the DOM_GID structure, in the USER_INFO_1 structure, in the LSA SAM Logon response. -</p><div class="sect3" title="Well-known RID users"><div class="titlepage"><div><div><h4 class="title"><a name="id2562552"></a>Well-known RID users</h4></div></div></div><div class="segmentedlist"><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong>DOMAIN_USER_RID_ADMIN</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>01F4</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong>DOMAIN_USER_RID_GUEST</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>01F5</div></div></div></div><div class="sect3" title="Well-known RID groups"><div class="titlepage"><div><div><h4 class="title"><a name="id2562589"></a>Well-known RID groups</h4></div></div></div><div class="segmentedlist"><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_GROUP_RID_ADMINS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0200</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_GROUP_RID_USERS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0201</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_GROUP_RID_GUESTS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0202</div></div></div></div><div class="sect3" title="Well-known RID aliases"><div class="titlepage"><div><div><h4 class="title"><a name="id2562634"></a>Well-known RID aliases</h4></div></div></div><div class="segmentedlist"><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_ADMINS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0220</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_USERS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0221</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_GUESTS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0222</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_POWER_USERS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0223</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_ACCOUNT_OPS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0224</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_SYSTEM_OPS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0225</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_PRINT_OPS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0226</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_BACKUP_OPS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0227</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_REPLICATOR</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0228</div></div></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="unix-smb.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pt02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. NetBIOS in a Unix World </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part II. Samba Basics</td></tr></table></div></body></html> +</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2556480"></a>Well-known RID users</h4></div></div></div><div class="segmentedlist"><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong>DOMAIN_USER_RID_ADMIN</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>01F4</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong>DOMAIN_USER_RID_GUEST</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>01F5</div></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2556516"></a>Well-known RID groups</h4></div></div></div><div class="segmentedlist"><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_GROUP_RID_ADMINS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0200</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_GROUP_RID_USERS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0201</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_GROUP_RID_GUESTS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0202</div></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2556561"></a>Well-known RID aliases</h4></div></div></div><div class="segmentedlist"><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_ADMINS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0220</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_USERS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0221</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_GUESTS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0222</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_POWER_USERS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0223</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_ACCOUNT_OPS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0224</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_SYSTEM_OPS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0225</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_PRINT_OPS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0226</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_BACKUP_OPS</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0227</div></div><div class="seglistitem"><div class="seg"><strong><span class="segtitle">Groupname: </span></strong> DOMAIN_ALIAS_RID_REPLICATOR</div><div class="seg"><strong><span class="segtitle">????: </span></strong>0x0000</div><div class="seg"><strong><span class="segtitle">RID: </span></strong>0228</div></div></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="unix-smb.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pt02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. NetBIOS in a Unix World </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part II. Samba Basics</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/parsing.html b/docs/htmldocs/Samba3-Developers-Guide/parsing.html index c392165ddd..c776bbf48f 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/parsing.html +++ b/docs/htmldocs/Samba3-Developers-Guide/parsing.html @@ -1,46 +1,46 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 11. The smb.conf file</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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="vfs.html" title="Chapter 10. VFS Modules"><link rel="next" href="wins.html" title="Chapter 12. Samba WINS Internals"></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 11. The smb.conf file</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vfs.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="wins.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 11. The smb.conf file"><div class="titlepage"><div><div><h2 class="title"><a name="parsing"></a>Chapter 11. The smb.conf file</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Chris</span> <span class="surname">Hertel</span></h3></div></div><div><p class="pubdate">November 1997</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="parsing.html#id2566406">Lexical Analysis</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2566478">Handling of Whitespace</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2566523">Handling of Line Continuation</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2566574">Line Continuation Quirks</a></span></dt></dl></dd><dt><span class="sect1"><a href="parsing.html#id2566651">Syntax</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2566709">About params.c</a></span></dt></dl></dd></dl></div><div class="sect1" title="Lexical Analysis"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2566406"></a>Lexical Analysis</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 11. The smb.conf file</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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="vfs.html" title="Chapter 10. VFS Modules"><link rel="next" href="wins.html" title="Chapter 12. Samba WINS Internals"></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 11. The smb.conf file</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vfs.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="wins.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="parsing"></a>Chapter 11. The smb.conf file</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Chris</span> <span class="surname">Hertel</span></h3></div></div><div><p class="pubdate">November 1997</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="parsing.html#id2560333">Lexical Analysis</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2560405">Handling of Whitespace</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2560450">Handling of Line Continuation</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2560502">Line Continuation Quirks</a></span></dt></dl></dd><dt><span class="sect1"><a href="parsing.html#id2560579">Syntax</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2560636">About params.c</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="id2560333"></a>Lexical Analysis</h2></div></div></div><p> Basically, the file is processed on a line by line basis. There are four types of lines that are recognized by the lexical analyzer (params.c): -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="orderedlist"><ol type="1"><li><p> Blank lines - Lines containing only whitespace. -</p></li><li class="listitem"><p> +</p></li><li><p> Comment lines - Lines beginning with either a semi-colon or a pound sign (';' or '#'). -</p></li><li class="listitem"><p> +</p></li><li><p> Section header lines - Lines beginning with an open square bracket ('['). -</p></li><li class="listitem"><p> +</p></li><li><p> Parameter lines - Lines beginning with any other character. (The default line type.) </p></li></ol></div><p> The first two are handled exclusively by the lexical analyzer, which ignores them. The latter two line types are scanned for -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="orderedlist"><ol type="1"><li><p> - Section names -</p></li><li class="listitem"><p> +</p></li><li><p> - Parameter names -</p></li><li class="listitem"><p> +</p></li><li><p> - Parameter values </p></li></ol></div><p> These are the only tokens passed to the parameter loader (loadparm.c). Parameter names and values are divided from one another by an equal sign: '='. -</p><div class="sect2" title="Handling of Whitespace"><div class="titlepage"><div><div><h3 class="title"><a name="id2566478"></a>Handling of Whitespace</h3></div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560405"></a>Handling of Whitespace</h3></div></div></div><p> Whitespace is defined as all characters recognized by the isspace() function (see ctype(3C)) except for the newline character ('\n') The newline is excluded because it identifies the end of the line. -</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</p><div class="orderedlist"><ol type="1"><li><p> The lexical analyzer scans past white space at the beginning of a line. -</p></li><li class="listitem"><p> +</p></li><li><p> Section and parameter names may contain internal white space. All whitespace within a name is compressed to a single space character. -</p></li><li class="listitem"><p> +</p></li><li><p> Internal whitespace within a parameter value is kept verbatim with the exception of carriage return characters ('\r'), all of which are removed. -</p></li><li class="listitem"><p> +</p></li><li><p> Leading and trailing whitespace is removed from names and values. -</p></li></ol></div></div><div class="sect2" title="Handling of Line Continuation"><div class="titlepage"><div><div><h3 class="title"><a name="id2566523"></a>Handling of Line Continuation</h3></div></div></div><p> +</p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560450"></a>Handling of Line Continuation</h3></div></div></div><p> Long section header and parameter lines may be extended across multiple lines by use of the backslash character ('\\'). Line continuation is ignored for blank and comment lines. @@ -63,7 +63,7 @@ line, plus the four preceeding the word 'with' in the second line. Line continuation characters are ignored on blank lines and at the end of comments. They are *only* recognized within section and parameter lines. -</p></div><div class="sect2" title="Line Continuation Quirks"><div class="titlepage"><div><div><h3 class="title"><a name="id2566574"></a>Line Continuation Quirks</h3></div></div></div><p>Note the following example:</p><pre class="programlisting"> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560502"></a>Line Continuation Quirks</h3></div></div></div><p>Note the following example:</p><pre class="programlisting"> param name = parameter value string \ \ with line continuation. @@ -87,26 +87,26 @@ terminating character, and the rest of the line is ignored. The lines </pre><p>are read as</p><pre class="programlisting"> [section name] param name = value -</pre></div></div><div class="sect1" title="Syntax"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2566651"></a>Syntax</h2></div></div></div><p>The syntax of the smb.conf file is as follows:</p><pre class="programlisting"> +</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2560579"></a>Syntax</h2></div></div></div><p>The syntax of the smb.conf file is as follows:</p><pre class="programlisting"> <file> :== { <section> } EOF <section> :== <section header> { <parameter line> } <section header> :== '[' NAME ']' <parameter line> :== NAME '=' VALUE NL -</pre><p>Basically, this means that</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</pre><p>Basically, this means that</p><div class="orderedlist"><ol type="1"><li><p> a file is made up of zero or more sections, and is terminated by an EOF (we knew that). -</p></li><li class="listitem"><p> +</p></li><li><p> A section is made up of a section header followed by zero or more parameter lines. -</p></li><li class="listitem"><p> +</p></li><li><p> A section header is identified by an opening bracket and terminated by the closing bracket. The enclosed NAME identifies the section. -</p></li><li class="listitem"><p> +</p></li><li><p> A parameter line is divided into a NAME and a VALUE. The *first* equal sign on the line separates the NAME from the VALUE. The VALUE is terminated by a newline character (NL = '\n'). -</p></li></ol></div><div class="sect2" title="About params.c"><div class="titlepage"><div><div><h3 class="title"><a name="id2566709"></a>About params.c</h3></div></div></div><p> +</p></li></ol></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560636"></a>About params.c</h3></div></div></div><p> The parsing of the config file is a bit unusual if you are used to lex, yacc, bison, etc. Both lexical analysis (scanning) and parsing are performed by params.c. Values are loaded via callbacks to diff --git a/docs/htmldocs/Samba3-Developers-Guide/pr01.html b/docs/htmldocs/Samba3-Developers-Guide/pr01.html index 5c4ea0c775..4a09fa06bd 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/pr01.html +++ b/docs/htmldocs/Samba3-Developers-Guide/pr01.html @@ -1,33 +1,33 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Attribution</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="index.html" title="SAMBA Developers Guide"><link rel="next" href="pt01.html" title="Part I. The protocol"></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">Attribution</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pt01.html">Next</a></td></tr></table><hr></div><div class="preface" title="Attribution"><div class="titlepage"><div><div><h2 class="title"><a name="id2546462"></a>Attribution</h2></div></div></div><p><a class="link" href="unix-smb.html" title="Chapter 1. NetBIOS in a Unix World">NetBIOS in a Unix World</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Andrew Tridgell</p></li></ul></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Attribution</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="index.html" title="SAMBA Developers Guide"><link rel="next" href="pt01.html" title="Part I. The protocol"></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">Attribution</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pt01.html">Next</a></td></tr></table><hr></div><div class="preface" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2540388"></a>Attribution</h2></div></div></div><p><a class="link" href="unix-smb.html" title="Chapter 1. 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> </p><p><a class="link" href="ntdomain.html" title="Chapter 2. NT Domain RPC's">NT Domain RPC's</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Luke Leighton<a class="ulink" href="mailto:lkcl@switchboard.net" target="_top">mailto:lkcl@switchboard.net</a></p></li><li class="listitem"><p>Paul Ashton<a class="ulink" href="mailto:paul@argo.demon.co.uk" target="_top">mailto:paul@argo.demon.co.uk</a></p></li><li class="listitem"><p>Duncan Stansfield<a class="ulink" href="mailto:duncans@sco.com" target="_top">mailto:duncans@sco.com</a></p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Luke Leighton<a class="ulink" href="mailto:lkcl@switchboard.net" target="_top">mailto:lkcl@switchboard.net</a></p></li><li><p>Paul Ashton<a class="ulink" href="mailto:paul@argo.demon.co.uk" target="_top">mailto:paul@argo.demon.co.uk</a></p></li><li><p>Duncan Stansfield<a class="ulink" href="mailto:duncans@sco.com" target="_top">mailto:duncans@sco.com</a></p></li></ul></div><p> </p><p><a class="link" href="architecture.html" title="Chapter 3. Samba Architecture">Samba Architecture</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Dan Shearer</p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Dan Shearer</p></li></ul></div><p> </p><p><a class="link" href="debug.html" title="Chapter 4. The samba DEBUG system">The samba DEBUG system</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Chris Hertel</p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Chris Hertel</p></li></ul></div><p> </p><p><a class="link" href="internals.html" title="Chapter 5. Samba Internals">Samba Internals</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>David Chappell<a class="ulink" href="mailto:David.Chappell@mail.trincoll.edu" target="_top">mailto:David.Chappell@mail.trincoll.edu</a></p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>David Chappell<a class="ulink" href="mailto:David.Chappell@mail.trincoll.edu" target="_top">mailto:David.Chappell@mail.trincoll.edu</a></p></li></ul></div><p> </p><p><a class="link" href="CodingSuggestions.html" title="Chapter 6. Coding Suggestions">Coding Suggestions</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Steve French</p></li><li class="listitem"><p>Simo Sorce</p></li><li class="listitem"><p>Andrew Bartlett</p></li><li class="listitem"><p>Tim Potter</p></li><li class="listitem"><p>Martin Pool</p></li></ul></div><p> + </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> </p><p><a class="link" href="contributing.html" title="Chapter 7. Contributing code">Contributing code</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Jelmer R. Vernooij<a class="ulink" href="mailto:jelmer@samba.org" target="_top">mailto:jelmer@samba.org</a></p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer R. Vernooij<a class="ulink" href="mailto:jelmer@samba.org" target="_top">mailto:jelmer@samba.org</a></p></li></ul></div><p> </p><p><a class="link" href="modules.html" title="Chapter 8. Modules">Modules</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Jelmer Vernooij<a class="ulink" href="mailto:jelmer@samba.org" target="_top">mailto:jelmer@samba.org</a></p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer Vernooij<a class="ulink" href="mailto:jelmer@samba.org" target="_top">mailto:jelmer@samba.org</a></p></li></ul></div><p> </p><p><a class="link" href="rpc-plugin.html" title="Chapter 9. RPC Pluggable Modules">RPC Pluggable Modules</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Anthony Liguori<a class="ulink" href="mailto:aliguor@us.ibm.com" target="_top">mailto:aliguor@us.ibm.com</a></p></li><li class="listitem"><p>Jelmer Vernooij<a class="ulink" href="mailto:jelmer@samba.org" target="_top">mailto:jelmer@samba.org</a></p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Anthony Liguori<a class="ulink" href="mailto:aliguor@us.ibm.com" target="_top">mailto:aliguor@us.ibm.com</a></p></li><li><p>Jelmer Vernooij<a class="ulink" href="mailto:jelmer@samba.org" target="_top">mailto:jelmer@samba.org</a></p></li></ul></div><p> </p><p><a class="link" href="vfs.html" title="Chapter 10. VFS Modules">VFS Modules</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Alexander Bokovoy<a class="ulink" href="mailto:ab@samba.org" target="_top">mailto:ab@samba.org</a></p></li><li class="listitem"><p>Stefan Metzmacher<a class="ulink" href="mailto:metze@samba.org" target="_top">mailto:metze@samba.org</a></p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Alexander Bokovoy<a class="ulink" href="mailto:ab@samba.org" target="_top">mailto:ab@samba.org</a></p></li><li><p>Stefan Metzmacher<a class="ulink" href="mailto:metze@samba.org" target="_top">mailto:metze@samba.org</a></p></li></ul></div><p> </p><p><a class="link" href="parsing.html" title="Chapter 11. The smb.conf file">The smb.conf file</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Chris Hertel</p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Chris Hertel</p></li></ul></div><p> </p><p><a class="link" href="wins.html" title="Chapter 12. Samba WINS Internals">Samba WINS Internals</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Gerald Carter</p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Gerald Carter</p></li></ul></div><p> </p><p><a class="link" href="pwencrypt.html" title="Chapter 13. LanMan and NT Password Encryption">LanMan and NT Password Encryption</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Jeremy Allison<a class="ulink" href="mailto:samba@samba.org" target="_top">mailto:samba@samba.org</a></p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Jeremy Allison<a class="ulink" href="mailto:samba@samba.org" target="_top">mailto:samba@samba.org</a></p></li></ul></div><p> </p><p><a class="link" href="tracing.html" title="Chapter 14. Tracing samba system calls">Tracing samba system calls</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Andrew Tridgell</p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Andrew Tridgell</p></li></ul></div><p> </p><p><a class="link" href="devprinting.html" title="Chapter 15. Samba Printing Internals">Samba Printing Internals</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Gerald Carter</p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Gerald Carter</p></li></ul></div><p> </p><p><a class="link" href="Packaging.html" title="Chapter 16. Notes to packagers">Notes to packagers</a> - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Jelmer Vernooij</p></li></ul></div><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>Jelmer Vernooij</p></li></ul></div><p> </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pt01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SAMBA Developers Guide </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part I. The protocol</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/pt01.html b/docs/htmldocs/Samba3-Developers-Guide/pt01.html index 71e44f6f77..0e2eb68c79 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/pt01.html +++ b/docs/htmldocs/Samba3-Developers-Guide/pt01.html @@ -1 +1 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part I. The protocol</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="pr01.html" title="Attribution"><link rel="next" href="unix-smb.html" title="Chapter 1. NetBIOS in a Unix World"></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">Part I. The protocol</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pr01.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="unix-smb.html">Next</a></td></tr></table><hr></div><div class="part" title="Part I. The protocol"><div class="titlepage"><div><div><h1 class="title"><a name="id2505164"></a>Part I. The protocol</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="unix-smb.html">1. NetBIOS in a Unix World</a></span></dt><dd><dl><dt><span class="sect1"><a href="unix-smb.html#id2505193">Introduction</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505214">Usernames</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505546">File Ownership</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505577">Passwords</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2504910">Locking</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2504962">Deny Modes</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2504994">Trapdoor UIDs</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505015">Port numbers</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2556040">Protocol Complexity</a></span></dt></dl></dd><dt><span class="chapter"><a href="ntdomain.html">2. NT Domain RPC's</a></span></dt><dd><dl><dt><span class="sect1"><a href="ntdomain.html#id2556159">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2556325">Sources</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556351">Credits</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2556382">Notes and Structures</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2556388">Notes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556450">Enumerations</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556613">Structures</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2558885">MSRPC over Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2558896">MSRPC Pipes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2558979">Header</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559653">Tail</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559688">RPC Bind / Bind Ack</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559827">NTLSA Transact Named Pipe</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2559955">LSA Open Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560051">LSA Query Info Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560132">LSA Enumerate Trusted Domains</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560202">LSA Open Secret</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560285">LSA Close</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560336">LSA Lookup SIDS</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560497">LSA Lookup Names</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2560669">NETLOGON rpc Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2560795">LSA Request Challenge</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2560904">LSA Authenticate 2</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561019">LSA Server Password Set</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561111">LSA SAM Logon</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561190">LSA SAM Logoff</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2561262">\\MAILSLOT\NET\NTLOGON</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2561276">Query for PDC</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561476">SAM Logon</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2561726">SRVSVC Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2561760">Net Share Enum</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2561928">Net Server Get Info</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2562018">Cryptographic side of NT Domain Authentication</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2562024">Definitions</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2562150">Protocol</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2562229">Comments</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2562270">SIDs and RIDs</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2562302">Well-known SIDs</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2562541">Well-known RIDS</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pr01.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="unix-smb.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Attribution </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1. NetBIOS in a Unix World</td></tr></table></div></body></html> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part I. The protocol</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="pr01.html" title="Attribution"><link rel="next" href="unix-smb.html" title="Chapter 1. NetBIOS in a Unix World"></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">Part I. The protocol</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pr01.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="unix-smb.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2499093"></a>Part I. The protocol</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="unix-smb.html">1. NetBIOS in a Unix World</a></span></dt><dd><dl><dt><span class="sect1"><a href="unix-smb.html#id2499122">Introduction</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2499143">Usernames</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2499475">File Ownership</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2499506">Passwords</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498843">Locking</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498891">Deny Modes</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498923">Trapdoor UIDs</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498944">Port numbers</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498960">Protocol Complexity</a></span></dt></dl></dd><dt><span class="chapter"><a href="ntdomain.html">2. NT Domain RPC's</a></span></dt><dd><dl><dt><span class="sect1"><a href="ntdomain.html#id2550090">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2550255">Sources</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2550282">Credits</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2550313">Notes and Structures</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2550318">Notes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2550381">Enumerations</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2550543">Structures</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2552813">MSRPC over Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2552823">MSRPC Pipes</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2552907">Header</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553580">Tail</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553616">RPC Bind / Bind Ack</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553755">NTLSA Transact Named Pipe</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553883">LSA Open Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2553978">LSA Query Info Policy</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554060">LSA Enumerate Trusted Domains</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554130">LSA Open Secret</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554213">LSA Close</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554264">LSA Lookup SIDS</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554425">LSA Lookup Names</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2554597">NETLOGON rpc Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2554723">LSA Request Challenge</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554832">LSA Authenticate 2</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2554947">LSA Server Password Set</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555038">LSA SAM Logon</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555118">LSA SAM Logoff</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2555189">\\MAILSLOT\NET\NTLOGON</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2555203">Query for PDC</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555404">SAM Logon</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2555654">SRVSVC Transact Named Pipe</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2555688">Net Share Enum</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2555856">Net Server Get Info</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2555945">Cryptographic side of NT Domain Authentication</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2555952">Definitions</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556077">Protocol</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556156">Comments</a></span></dt></dl></dd><dt><span class="sect1"><a href="ntdomain.html#id2556198">SIDs and RIDs</a></span></dt><dd><dl><dt><span class="sect2"><a href="ntdomain.html#id2556230">Well-known SIDs</a></span></dt><dt><span class="sect2"><a href="ntdomain.html#id2556468">Well-known RIDS</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pr01.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="unix-smb.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Attribution </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1. NetBIOS in a Unix World</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/pt02.html b/docs/htmldocs/Samba3-Developers-Guide/pt02.html index 026918b6fe..c626d195bb 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/pt02.html +++ b/docs/htmldocs/Samba3-Developers-Guide/pt02.html @@ -1 +1 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part II. Samba Basics</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="ntdomain.html" title="Chapter 2. NT Domain RPC's"><link rel="next" href="architecture.html" title="Chapter 3. Samba Architecture"></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">Part II. Samba Basics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ntdomain.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="architecture.html">Next</a></td></tr></table><hr></div><div class="part" title="Part II. Samba Basics"><div class="titlepage"><div><div><h1 class="title"><a name="id2562737"></a>Part II. Samba Basics</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="architecture.html">3. Samba Architecture</a></span></dt><dd><dl><dt><span class="sect1"><a href="architecture.html#id2562765">Introduction</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562808">Multithreading and Samba</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562839">Threading smbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562900">Threading nmbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2562945">nbmd Design</a></span></dt></dl></dd><dt><span class="chapter"><a href="debug.html">4. The samba DEBUG system</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug.html#id2563001">New Output Syntax</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563111">The DEBUG() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563216">The DEBUGADD() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563252">The DEBUGLVL() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2563343">New Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#id2563348">dbgtext()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2563364">dbghdr()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2563383">format_debug_text()</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="internals.html">5. Samba Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="internals.html#id2563435">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2563456">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2563585">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2563596">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563607">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563618">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563628">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563641">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563652">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563664">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563675">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563686">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563698">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563709">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563720">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563732">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563743">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563755">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2563768">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2563796">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563920">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2563990">Code character table</a></span></dt></dl></dd><dt><span class="chapter"><a href="CodingSuggestions.html">6. Coding Suggestions</a></span></dt><dt><span class="chapter"><a href="contributing.html">7. Contributing code</a></span></dt><dt><span class="chapter"><a href="modules.html">8. Modules</a></span></dt><dd><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></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ntdomain.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="architecture.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. NT Domain RPC's </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Samba Architecture</td></tr></table></div></body></html> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part II. Samba Basics</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="ntdomain.html" title="Chapter 2. NT Domain RPC's"><link rel="next" href="architecture.html" title="Chapter 3. Samba Architecture"></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">Part II. Samba Basics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ntdomain.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="architecture.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2556665"></a>Part II. Samba Basics</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="architecture.html">3. Samba Architecture</a></span></dt><dd><dl><dt><span class="sect1"><a href="architecture.html#id2556692">Introduction</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556735">Multithreading and Samba</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556767">Threading smbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556828">Threading nmbd</a></span></dt><dt><span class="sect1"><a href="architecture.html#id2556873">nbmd Design</a></span></dt></dl></dd><dt><span class="chapter"><a href="debug.html">4. The samba DEBUG system</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug.html#id2556929">New Output Syntax</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557038">The DEBUG() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557144">The DEBUGADD() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557180">The DEBUGLVL() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2557271">New Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#id2557276">dbgtext()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2557292">dbghdr()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2557311">format_debug_text()</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="internals.html">5. Samba Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="internals.html#id2557363">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557384">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557513">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557523">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557534">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557545">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557556">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557568">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557580">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557591">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557603">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557614">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557625">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557637">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557648">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557660">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557671">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557683">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557696">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557723">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557848">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557918">Code character table</a></span></dt></dl></dd><dt><span class="chapter"><a href="CodingSuggestions.html">6. Coding Suggestions</a></span></dt><dt><span class="chapter"><a href="contributing.html">7. Contributing code</a></span></dt><dt><span class="chapter"><a href="modules.html">8. Modules</a></span></dt><dd><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></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ntdomain.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="architecture.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. NT Domain RPC's </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Samba Architecture</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/pt03.html b/docs/htmldocs/Samba3-Developers-Guide/pt03.html index 176100b532..6811ff0ef1 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/pt03.html +++ b/docs/htmldocs/Samba3-Developers-Guide/pt03.html @@ -1 +1 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part III. Samba Subsystems</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="modules.html" title="Chapter 8. Modules"><link rel="next" href="rpc-plugin.html" title="Chapter 9. RPC Pluggable Modules"></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">Part III. Samba Subsystems</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="modules.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="rpc-plugin.html">Next</a></td></tr></table><hr></div><div class="part" title="Part III. Samba Subsystems"><div class="titlepage"><div><div><h1 class="title"><a name="id2564909"></a>Part III. Samba Subsystems</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="rpc-plugin.html">9. RPC Pluggable Modules</a></span></dt><dd><dl><dt><span class="sect1"><a href="rpc-plugin.html#id2564970">About</a></span></dt><dt><span class="sect1"><a href="rpc-plugin.html#id2564986">General Overview</a></span></dt></dl></dd><dt><span class="chapter"><a href="vfs.html">10. VFS Modules</a></span></dt><dd><dl><dt><span class="sect1"><a href="vfs.html#id2565148">The Samba (Posix) VFS layer</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2565189">The general interface</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2565500">Possible VFS operation layers</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2565561">The Interaction between the Samba VFS subsystem and the modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2565568">Initialization and registration</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2565713">How the Modules handle per connection data</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2565913">Upgrading to the New VFS Interface</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2565919">Upgrading from 2.2.* and 3.0alpha modules</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2566324">Some Notes</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2566329">Implement TRANSPARENT functions</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2566349">Implement OPAQUE functions</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parsing.html">11. The smb.conf file</a></span></dt><dd><dl><dt><span class="sect1"><a href="parsing.html#id2566406">Lexical Analysis</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2566478">Handling of Whitespace</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2566523">Handling of Line Continuation</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2566574">Line Continuation Quirks</a></span></dt></dl></dd><dt><span class="sect1"><a href="parsing.html#id2566651">Syntax</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2566709">About params.c</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="wins.html">12. Samba WINS Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="wins.html#id2566747">WINS Failover</a></span></dt></dl></dd><dt><span class="chapter"><a href="pwencrypt.html">13. LanMan and NT Password Encryption</a></span></dt><dd><dl><dt><span class="sect1"><a href="pwencrypt.html#id2566865">Introduction</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2566885">How does it work?</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2566969">The smbpasswd file</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="modules.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="rpc-plugin.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 8. Modules </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. RPC Pluggable Modules</td></tr></table></div></body></html> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part III. Samba Subsystems</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="modules.html" title="Chapter 8. Modules"><link rel="next" href="rpc-plugin.html" title="Chapter 9. RPC Pluggable Modules"></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">Part III. Samba Subsystems</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="modules.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="rpc-plugin.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2558836"></a>Part III. Samba Subsystems</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="rpc-plugin.html">9. RPC Pluggable Modules</a></span></dt><dd><dl><dt><span class="sect1"><a href="rpc-plugin.html#id2558898">About</a></span></dt><dt><span class="sect1"><a href="rpc-plugin.html#id2558913">General Overview</a></span></dt></dl></dd><dt><span class="chapter"><a href="vfs.html">10. VFS Modules</a></span></dt><dd><dl><dt><span class="sect1"><a href="vfs.html#id2559076">The Samba (Posix) VFS layer</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2559117">The general interface</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2559428">Possible VFS operation layers</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2559489">The Interaction between the Samba VFS subsystem and the modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2559495">Initialization and registration</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2559640">How the Modules handle per connection data</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2559841">Upgrading to the New VFS Interface</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2559847">Upgrading from 2.2.* and 3.0alpha modules</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2560251">Some Notes</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2560257">Implement TRANSPARENT functions</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2560276">Implement OPAQUE functions</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parsing.html">11. The smb.conf file</a></span></dt><dd><dl><dt><span class="sect1"><a href="parsing.html#id2560333">Lexical Analysis</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2560405">Handling of Whitespace</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2560450">Handling of Line Continuation</a></span></dt><dt><span class="sect2"><a href="parsing.html#id2560502">Line Continuation Quirks</a></span></dt></dl></dd><dt><span class="sect1"><a href="parsing.html#id2560579">Syntax</a></span></dt><dd><dl><dt><span class="sect2"><a href="parsing.html#id2560636">About params.c</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="wins.html">12. Samba WINS Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="wins.html#id2560674">WINS Failover</a></span></dt></dl></dd><dt><span class="chapter"><a href="pwencrypt.html">13. LanMan and NT Password Encryption</a></span></dt><dd><dl><dt><span class="sect1"><a href="pwencrypt.html#id2560792">Introduction</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2560813">How does it work?</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2560896">The smbpasswd file</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="modules.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="rpc-plugin.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 8. Modules </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. RPC Pluggable Modules</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/pt04.html b/docs/htmldocs/Samba3-Developers-Guide/pt04.html index 0f5c5d149b..6e112e9b8c 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/pt04.html +++ b/docs/htmldocs/Samba3-Developers-Guide/pt04.html @@ -1,9 +1,9 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part IV. Debugging and tracing</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="pwencrypt.html" title="Chapter 13. LanMan and NT Password Encryption"><link rel="next" href="tracing.html" title="Chapter 14. Tracing samba system calls"></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">Part IV. Debugging and tracing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pwencrypt.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="tracing.html">Next</a></td></tr></table><hr></div><div class="part" title="Part IV. Debugging and tracing"><div class="titlepage"><div><div><h1 class="title"><a name="id2567225"></a>Part IV. Debugging and tracing</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="tracing.html">14. Tracing samba system calls</a></span></dt><dt><span class="chapter"><a href="devprinting.html">15. Samba Printing Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="devprinting.html#id2567455">Abstract</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567467"> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part IV. Debugging and tracing</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="pwencrypt.html" title="Chapter 13. LanMan and NT Password Encryption"><link rel="next" href="tracing.html" title="Chapter 14. Tracing samba system calls"></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">Part IV. Debugging and tracing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pwencrypt.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="tracing.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2561153"></a>Part IV. Debugging and tracing</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="tracing.html">14. Tracing samba system calls</a></span></dt><dt><span class="chapter"><a href="devprinting.html">15. Samba Printing Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="devprinting.html#id2561382">Abstract</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561395"> Printing Interface to Various Back ends -</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567544"> +</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561471"> Print Queue TDB's -</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567717"> +</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561645"> ChangeID and Client Caching of Printer Information -</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2567728"> +</a></span></dt><dt><span class="sect1"><a href="devprinting.html#id2561655"> Windows NT/2K Printer Change Notify </a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pwencrypt.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="tracing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 13. LanMan and NT Password Encryption </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 14. Tracing samba system calls</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/pt05.html b/docs/htmldocs/Samba3-Developers-Guide/pt05.html index 9f98b4ad16..818fc6e9a1 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/pt05.html +++ b/docs/htmldocs/Samba3-Developers-Guide/pt05.html @@ -1 +1 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part V. Appendices</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="devprinting.html" title="Chapter 15. Samba Printing Internals"><link rel="next" href="Packaging.html" title="Chapter 16. Notes to packagers"></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">Part V. Appendices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="devprinting.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="Packaging.html">Next</a></td></tr></table><hr></div><div class="part" title="Part V. Appendices"><div class="titlepage"><div><div><h1 class="title"><a name="id2568024"></a>Part V. Appendices</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="Packaging.html">16. Notes to packagers</a></span></dt><dd><dl><dt><span class="sect1"><a href="Packaging.html#id2568047">Versioning</a></span></dt><dt><span class="sect1"><a href="Packaging.html#id2568080">Modules</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="devprinting.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="Packaging.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 15. Samba Printing Internals </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Notes to packagers</td></tr></table></div></body></html> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Part V. Appendices</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="index.html" title="SAMBA Developers Guide"><link rel="prev" href="devprinting.html" title="Chapter 15. Samba Printing Internals"><link rel="next" href="Packaging.html" title="Chapter 16. Notes to packagers"></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">Part V. Appendices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="devprinting.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="Packaging.html">Next</a></td></tr></table><hr></div><div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2561951"></a>Part V. Appendices</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="Packaging.html">16. Notes to packagers</a></span></dt><dd><dl><dt><span class="sect1"><a href="Packaging.html#id2561975">Versioning</a></span></dt><dt><span class="sect1"><a href="Packaging.html#id2562008">Modules</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="devprinting.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="Packaging.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 15. Samba Printing Internals </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Notes to packagers</td></tr></table></div></body></html> diff --git a/docs/htmldocs/Samba3-Developers-Guide/pwencrypt.html b/docs/htmldocs/Samba3-Developers-Guide/pwencrypt.html index c33843af52..0be7dc0409 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/pwencrypt.html +++ b/docs/htmldocs/Samba3-Developers-Guide/pwencrypt.html @@ -1,12 +1,12 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 13. LanMan and NT Password Encryption</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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="wins.html" title="Chapter 12. Samba WINS Internals"><link rel="next" href="pt04.html" title="Part IV. Debugging and tracing"></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 13. LanMan and NT Password Encryption</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="wins.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="pt04.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 13. LanMan and NT Password Encryption"><div class="titlepage"><div><div><h2 class="title"><a name="pwencrypt"></a>Chapter 13. LanMan and NT Password Encryption</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jeremy</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><br> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 13. LanMan and NT Password Encryption</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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="wins.html" title="Chapter 12. Samba WINS Internals"><link rel="next" href="pt04.html" title="Part IV. Debugging and tracing"></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 13. LanMan and NT Password Encryption</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="wins.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="pt04.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="pwencrypt"></a>Chapter 13. LanMan and NT Password Encryption</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jeremy</span> <span class="orgname">Samba Team</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><br> <code class="email"><<a class="email" href="mailto:samba@samba.org">samba@samba.org</a>></code><br> - </p></div></div></div></div><div><p class="pubdate">19 Apr 1999</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="pwencrypt.html#id2566865">Introduction</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2566885">How does it work?</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2566969">The smbpasswd file</a></span></dt></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2566865"></a>Introduction</h2></div></div></div><p>With the development of LanManager and Windows NT + </p></div></div></div></div><div><p class="pubdate">19 Apr 1999</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="pwencrypt.html#id2560792">Introduction</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2560813">How does it work?</a></span></dt><dt><span class="sect1"><a href="pwencrypt.html#id2560896">The smbpasswd file</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2560792"></a>Introduction</h2></div></div></div><p>With the development of LanManager and Windows NT compatible password encryption for Samba, it is now able to validate user connections in exactly the same way as a LanManager or Windows NT server.</p><p>This document describes how the SMB password encryption algorithm works and what issues there are in choosing whether you want to use it. You should read it carefully, especially - the part about security and the "PROS and CONS" section.</p></div><div class="sect1" title="How does it work?"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2566885"></a>How does it work?</h2></div></div></div><p>LanManager encryption is somewhat similar to UNIX + the part about security and the "PROS and CONS" section.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2560813"></a>How does it work?</h2></div></div></div><p>LanManager encryption is somewhat similar to UNIX password encryption. The server uses a file containing a hashed value of a user's password. This is created by taking the user's plaintext password, capitalising it, and either @@ -43,7 +43,7 @@ know the correct password and is denied access.</p><p>Note that the Samba server never knows or stores the cleartext of the user's password - just the 16 byte hashed values derived from it. Also note that the cleartext password or 16 byte hashed values - are never transmitted over the network - thus increasing security.</p></div><div class="sect1" title="The smbpasswd file"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2566969"></a>The smbpasswd file</h2></div></div></div><a name="SMBPASSWDFILEFORMAT"></a><p>In order for Samba to participate in the above protocol + are never transmitted over the network - thus increasing security.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2560896"></a>The smbpasswd file</h2></div></div></div><a name="SMBPASSWDFILEFORMAT"></a><p>In order for Samba to participate in the above protocol it must be able to look up the 16 byte hashed values given a user name. Unfortunately, as the UNIX password value is also a one way hash function (ie. it is impossible to retrieve the cleartext of the user's diff --git a/docs/htmldocs/Samba3-Developers-Guide/rpc-plugin.html b/docs/htmldocs/Samba3-Developers-Guide/rpc-plugin.html index dd8a0b9db5..52ca69607c 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/rpc-plugin.html +++ b/docs/htmldocs/Samba3-Developers-Guide/rpc-plugin.html @@ -1,10 +1,10 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 9. RPC Pluggable 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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="pt03.html" title="Part III. Samba Subsystems"><link rel="next" href="vfs.html" title="Chapter 10. VFS Modules"></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 9. RPC Pluggable Modules</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt03.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="vfs.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 9. RPC Pluggable Modules"><div class="titlepage"><div><div><h2 class="title"><a name="rpc-plugin"></a>Chapter 9. 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><code class="email"><<a class="email" href="mailto:aliguor@us.ibm.com">aliguor@us.ibm.com</a>></code></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><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div><div><p class="pubdate">January 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="rpc-plugin.html#id2564970">About</a></span></dt><dt><span class="sect1"><a href="rpc-plugin.html#id2564986">General Overview</a></span></dt></dl></div><div class="sect1" title="About"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2564970"></a>About</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 9. RPC Pluggable 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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="pt03.html" title="Part III. Samba Subsystems"><link rel="next" href="vfs.html" title="Chapter 10. VFS Modules"></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 9. RPC Pluggable Modules</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt03.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="vfs.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="rpc-plugin"></a>Chapter 9. RPC Pluggable Modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Anthony</span> <span class="orgname">IBM</span> <span class="surname">Liguori</span></h3><div class="affiliation"><span class="orgname">IBM<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:aliguor@us.ibm.com">aliguor@us.ibm.com</a>></code></p></div></div></div></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"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div><div><p class="pubdate">January 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="rpc-plugin.html#id2558898">About</a></span></dt><dt><span class="sect1"><a href="rpc-plugin.html#id2558913">General Overview</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2558898"></a>About</h2></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" title="General Overview"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2564986"></a>General Overview</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2558913"></a>General Overview</h2></div></div></div><p> When an RPC call is sent to smbd, smbd tries to load a shared library by the name <code class="filename">librpc_<pipename>.so</code> to handle the call if it doesn't know how to handle the call internally. For instance, LSA calls diff --git a/docs/htmldocs/Samba3-Developers-Guide/tracing.html b/docs/htmldocs/Samba3-Developers-Guide/tracing.html index 711429155d..c9b652e6da 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/tracing.html +++ b/docs/htmldocs/Samba3-Developers-Guide/tracing.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 14. Tracing samba system calls</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="pt04.html" title="Part IV. Debugging and tracing"><link rel="prev" href="pt04.html" title="Part IV. Debugging and tracing"><link rel="next" href="devprinting.html" title="Chapter 15. Samba Printing Internals"></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 14. Tracing samba system calls</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt04.html">Prev</a> </td><th width="60%" align="center">Part IV. Debugging and tracing</th><td width="20%" align="right"> <a accesskey="n" href="devprinting.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 14. Tracing samba system calls"><div class="titlepage"><div><div><h2 class="title"><a name="tracing"></a>Chapter 14. Tracing samba system calls</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span></div></div></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 14. Tracing samba system calls</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="pt04.html" title="Part IV. Debugging and tracing"><link rel="prev" href="pt04.html" title="Part IV. Debugging and tracing"><link rel="next" href="devprinting.html" title="Chapter 15. Samba Printing Internals"></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 14. Tracing samba system calls</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt04.html">Prev</a> </td><th width="60%" align="center">Part IV. Debugging and tracing</th><td width="20%" align="right"> <a accesskey="n" href="devprinting.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="tracing"></a>Chapter 14. Tracing samba system calls</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="orgname">Samba Team</span> <span class="surname">Tridgell</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span></div></div></div></div></div><p> This file describes how to do a system call trace on Samba to work out what its doing wrong. This is not for the faint of heart, but if you are reading this then you are probably desperate. diff --git a/docs/htmldocs/Samba3-Developers-Guide/unix-smb.html b/docs/htmldocs/Samba3-Developers-Guide/unix-smb.html index 47ce7b9b39..2c574c4d30 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/unix-smb.html +++ b/docs/htmldocs/Samba3-Developers-Guide/unix-smb.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 1. NetBIOS in a Unix World</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="pt01.html" title="Part I. The protocol"><link rel="prev" href="pt01.html" title="Part I. The protocol"><link rel="next" href="ntdomain.html" title="Chapter 2. NT Domain RPC's"></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 1. NetBIOS in a Unix World</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt01.html">Prev</a> </td><th width="60%" align="center">Part I. The protocol</th><td width="20%" align="right"> <a accesskey="n" href="ntdomain.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 1. NetBIOS in a Unix World"><div class="titlepage"><div><div><h2 class="title"><a name="unix-smb"></a>Chapter 1. NetBIOS in a Unix World</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3></div></div><div><p class="pubdate">April 1995</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="unix-smb.html#id2505193">Introduction</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505214">Usernames</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505546">File Ownership</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505577">Passwords</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2504910">Locking</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2504962">Deny Modes</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2504994">Trapdoor UIDs</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2505015">Port numbers</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2556040">Protocol Complexity</a></span></dt></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2505193"></a>Introduction</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 1. NetBIOS in a Unix World</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="pt01.html" title="Part I. The protocol"><link rel="prev" href="pt01.html" title="Part I. The protocol"><link rel="next" href="ntdomain.html" title="Chapter 2. NT Domain RPC's"></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 1. NetBIOS in a Unix World</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt01.html">Prev</a> </td><th width="60%" align="center">Part I. The protocol</th><td width="20%" align="right"> <a accesskey="n" href="ntdomain.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="unix-smb"></a>Chapter 1. NetBIOS in a Unix World</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3></div></div><div><p class="pubdate">April 1995</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="unix-smb.html#id2499122">Introduction</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2499143">Usernames</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2499475">File Ownership</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2499506">Passwords</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498843">Locking</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498891">Deny Modes</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498923">Trapdoor UIDs</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498944">Port numbers</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2498960">Protocol Complexity</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2499122"></a>Introduction</h2></div></div></div><p> This is a short document that describes some of the issues that confront a SMB implementation on unix, and how Samba copes with them. They may help people who are looking at unix<->PC @@ -6,7 +6,7 @@ interoperability. </p><p> It was written to help out a person who was writing a paper on unix to PC connectivity. -</p></div><div class="sect1" title="Usernames"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2505214"></a>Usernames</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2499143"></a>Usernames</h2></div></div></div><p> The SMB protocol has only a loose username concept. Early SMB protocols (such as CORE and COREPLUS) have no username concept at all. Even in later protocols clients often attempt operations @@ -43,7 +43,7 @@ in the vast majority of cases. The methods include username maps, the service%user syntax, the saving of session setup usernames for later validation and the derivation of the username from the service name (either directly or via the user= option). -</p></div><div class="sect1" title="File Ownership"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2505546"></a>File Ownership</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2499475"></a>File Ownership</h2></div></div></div><p> The commonly used SMB protocols have no way of saying "you can't do that because you don't own the file". They have, in fact, no concept of file ownership at all. @@ -61,7 +61,7 @@ file time comparisons right. There are several possible solutions to this problem, including username mapping, and forcing a specific username for particular shares. -</p></div><div class="sect1" title="Passwords"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2505577"></a>Passwords</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2499506"></a>Passwords</h2></div></div></div><p> Many SMB clients uppercase passwords before sending them. I have no idea why they do this. Interestingly WfWg uppercases the password only if the server is running a protocol greater than COREPLUS, so @@ -83,7 +83,7 @@ This means that it is *VERY* important to ensure that the Samba smbpasswd file containing these password hashes is only readable by the root user. See the documentation ENCRYPTION.txt for more details. -</p></div><div class="sect1" title="Locking"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2504910"></a>Locking</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2498843"></a>Locking</h2></div></div></div><p> Since samba 2.2, samba supports other types of locking as well. This section is outdated. </p><p> @@ -114,7 +114,7 @@ asking the server to notify it if anyone else tries to do something on the same file, at which time the client will say if it is willing to give up its lock. Unix has no simple way of implementing opportunistic locking, and currently Samba has no support for it. -</p></div><div class="sect1" title="Deny Modes"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2504962"></a>Deny Modes</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2498891"></a>Deny Modes</h2></div></div></div><p> When a SMB client opens a file it asks for a particular "deny mode" to be placed on the file. These modes (DENY_NONE, DENY_READ, DENY_WRITE, DENY_ALL, DENY_FCB and DENY_DOS) specify what actions should be @@ -128,7 +128,7 @@ directory or a shared memory implementation. The lock file method is clumsy and consumes processing and file resources, the shared memory implementation is vastly prefered and is turned on by default for those systems that support it. -</p></div><div class="sect1" title="Trapdoor UIDs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2504994"></a>Trapdoor UIDs</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2498923"></a>Trapdoor UIDs</h2></div></div></div><p> A SMB session can run with several uids on the one socket. This happens when a user connects to two shares with different usernames. To cope with this the unix server needs to switch uids @@ -138,7 +138,7 @@ a single uid. </p><p> Note that you can also get the "trapdoor uid" message for other reasons. Please see the FAQ for details. -</p></div><div class="sect1" title="Port numbers"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2505015"></a>Port numbers</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2498944"></a>Port numbers</h2></div></div></div><p> There is a convention that clients on sockets use high "unprivileged" port numbers (>1000) and connect to servers on low "privilegedg" port numbers. This is enforced in Unix as non-root users can't open a @@ -161,7 +161,7 @@ to any of these OSes unless they are running as root. The answer comes back, but it goes to port 137 which the unix user can't listen on. Interestingly WinNT3.1 got this right - it sends node status responses back to the source port in the request. -</p></div><div class="sect1" title="Protocol Complexity"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2556040"></a>Protocol Complexity</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2498960"></a>Protocol Complexity</h2></div></div></div><p> There are many "protocol levels" in the SMB protocol. It seems that each time new functionality was added to a Microsoft operating system, they added the equivalent functions in a new protocol level of the SMB diff --git a/docs/htmldocs/Samba3-Developers-Guide/vfs.html b/docs/htmldocs/Samba3-Developers-Guide/vfs.html index 801e8a78e7..a0c8607dd4 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/vfs.html +++ b/docs/htmldocs/Samba3-Developers-Guide/vfs.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 10. VFS 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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="rpc-plugin.html" title="Chapter 9. RPC Pluggable Modules"><link rel="next" href="parsing.html" title="Chapter 11. The smb.conf file"></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 10. VFS Modules</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rpc-plugin.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="parsing.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 10. VFS Modules"><div class="titlepage"><div><div><h2 class="title"><a name="vfs"></a>Chapter 10. 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><code class="email"><<a class="email" href="mailto:ab@samba.org">ab@samba.org</a>></code></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><code class="email"><<a class="email" href="mailto:metze@samba.org">metze@samba.org</a>></code></p></div></div></div></div><div><p class="pubdate"> 27 May 2003 </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="vfs.html#id2565148">The Samba (Posix) VFS layer</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2565189">The general interface</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2565500">Possible VFS operation layers</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2565561">The Interaction between the Samba VFS subsystem and the modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2565568">Initialization and registration</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2565713">How the Modules handle per connection data</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2565913">Upgrading to the New VFS Interface</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2565919">Upgrading from 2.2.* and 3.0alpha modules</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2566324">Some Notes</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2566329">Implement TRANSPARENT functions</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2566349">Implement OPAQUE functions</a></span></dt></dl></dd></dl></div><div class="sect1" title="The Samba (Posix) VFS layer"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2565148"></a>The Samba (Posix) VFS layer</h2></div></div></div><p>While most of Samba deployments are done using POSIX-compatible +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 10. VFS 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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="rpc-plugin.html" title="Chapter 9. RPC Pluggable Modules"><link rel="next" href="parsing.html" title="Chapter 11. The smb.conf file"></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 10. VFS Modules</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rpc-plugin.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="parsing.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="vfs"></a>Chapter 10. 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><code class="email"><<a class="email" href="mailto:ab@samba.org">ab@samba.org</a>></code></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><code class="email"><<a class="email" href="mailto:metze@samba.org">metze@samba.org</a>></code></p></div></div></div></div><div><p class="pubdate"> 27 May 2003 </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="vfs.html#id2559076">The Samba (Posix) VFS layer</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2559117">The general interface</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2559428">Possible VFS operation layers</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2559489">The Interaction between the Samba VFS subsystem and the modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2559495">Initialization and registration</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2559640">How the Modules handle per connection data</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2559841">Upgrading to the New VFS Interface</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2559847">Upgrading from 2.2.* and 3.0alpha modules</a></span></dt></dl></dd><dt><span class="sect1"><a href="vfs.html#id2560251">Some Notes</a></span></dt><dd><dl><dt><span class="sect2"><a href="vfs.html#id2560257">Implement TRANSPARENT functions</a></span></dt><dt><span class="sect2"><a href="vfs.html#id2560276">Implement OPAQUE functions</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="id2559076"></a>The Samba (Posix) VFS layer</h2></div></div></div><p>While most of Samba deployments are done using POSIX-compatible operating systems, there is clearly more to a file system than what is required by POSIX when it comes to adopting semantics of NT file system. Since Samba 2.2 all file-system related operations go through @@ -24,12 +24,12 @@ information that is specific to a context it is operating in. Multiple VFS modules could be loaded at the same time and it is even possible to load several instances of the same VFS module with different parameters. -</p><div class="sect2" title="The general interface"><div class="titlepage"><div><div><h3 class="title"><a name="id2565189"></a>The general interface</h3></div></div></div><p>A VFS module has three major components: -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><span class="emphasis"><em>An initialization function</em></span> that is +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2559117"></a>The general interface</h3></div></div></div><p>A VFS module has three major components: +</p><div class="itemizedlist"><ul type="disc"><li><span class="emphasis"><em>An initialization function</em></span> that is called during the module load to register implemented -operations.</li><li class="listitem"><span class="emphasis"><em>An operations table</em></span> representing a +operations.</li><li><span class="emphasis"><em>An operations table</em></span> representing a mapping between statically defined module functions and VFS layer -operations.</li><li class="listitem"><span class="emphasis"><em>Module functions</em></span> that do actual +operations.</li><li><span class="emphasis"><em>Module functions</em></span> that do actual work.</li></ul></div><p> </p><p>While this structure has been first applied to the VFS subsystem, it is now commonly used across all Samba 3 subsystems that @@ -49,35 +49,35 @@ conflict is detected and module dropped to avoid any potential memory corruption when accessing (changed) Samba structures. </p><p>Therefore, initialization function passes three parameters to the VFS registration function, <code class="literal">smb_register_vfs()</code> -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><span class="emphasis"><em>interface version number</em></span>, as constant - <code class="literal">SMB_VFS_INTERFACE_VERSION</code>, </li><li class="listitem"><span class="emphasis"><em>module name</em></span>, under which Samba core - will know it, and</li><li class="listitem"><span class="emphasis"><em>an operations' table</em></span>.</li></ul></div><p> +</p><div class="itemizedlist"><ul type="disc"><li><span class="emphasis"><em>interface version number</em></span>, as constant + <code class="literal">SMB_VFS_INTERFACE_VERSION</code>, </li><li><span class="emphasis"><em>module name</em></span>, under which Samba core + will know it, and</li><li><span class="emphasis"><em>an operations' table</em></span>.</li></ul></div><p> </p><p>The <span class="emphasis"><em>operations' table</em></span> defines which functions in the module would correspond to specific VFS operations and how those functions would co-operate with the rest of VFS subsystem. Each operation could perform in a following ways: -</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><span class="emphasis"><em>transparent</em></span>, meaning that while +</p><div class="itemizedlist"><ul type="disc"><li><span class="emphasis"><em>transparent</em></span>, meaning that while operation is overriden, the module will still call a previous implementation, before or after its own action. This mode is indicated by the constant <code class="literal">SMB_VFS_LAYER_TRANSPARENT</code>; - </li><li class="listitem"><span class="emphasis"><em>opaque</em></span>, for the implementations that + </li><li><span class="emphasis"><em>opaque</em></span>, for the implementations that are terminating sequence of actions. For example, it is used to implement POSIX operation on top of non-POSIX file system or even not a file system at all, like a database for a personal audio collection. Use constant <code class="literal">SMB_VFS_LAYER_OPAQUE</code> for - this mode;</li><li class="listitem"><span class="emphasis"><em>splitter</em></span>, a way when some file system + this mode;</li><li><span class="emphasis"><em>splitter</em></span>, a way when some file system activity is done in addition to the transparently calling previous implentation. This usually involves mangling the result of that call before returning it back to the caller. This mode is selected by - <code class="literal">SMB_VFS_LAYER_SPLITTER</code> constant;</li><li class="listitem"><span class="emphasis"><em>logger</em></span> does not change anything or + <code class="literal">SMB_VFS_LAYER_SPLITTER</code> constant;</li><li><span class="emphasis"><em>logger</em></span> does not change anything or performs any additional VFS operations. When <span class="emphasis"><em>logger</em></span> module acts, information about operations is logged somewhere using an external facility (or Samba's own debugging tools) but not the VFS layer. In order to describe this type of activity use constant <code class="literal">SMB_VFS_LAYER_LOGGER</code>; - </li><li class="listitem">On contrary, <span class="emphasis"><em>scanner</em></span> module does call + </li><li>On contrary, <span class="emphasis"><em>scanner</em></span> module does call other VFS operations while processing the data that goes through the system. This type of operation is indicated by the <code class="literal">SMB_VFS_LAYER_SCANNER</code> constant.</li></ul></div><p> @@ -187,7 +187,7 @@ DO NOT ACCESS conn->vfs.ops.* directly !!! (tofd), (fsp), (fromfd), (header), (offset), (count))) ... -</pre></div><div class="sect2" title="Possible VFS operation layers"><div class="titlepage"><div><div><h3 class="title"><a name="id2565500"></a>Possible VFS operation layers</h3></div></div></div><p> +</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2559428"></a>Possible VFS operation layers</h3></div></div></div><p> These values are used by the VFS subsystem when building the conn->vfs and conn->vfs_opaque structs for a connection with multiple VFS modules. Internally, Samba differentiates only opaque and transparent layers at this process. @@ -216,7 +216,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" title="The Interaction between the Samba VFS subsystem and the modules"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2565561"></a>The Interaction between the Samba VFS subsystem and the modules</h2></div></div></div><div class="sect2" title="Initialization and registration"><div class="titlepage"><div><div><h3 class="title"><a name="id2565568"></a>Initialization and registration</h3></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="id2559489"></a>The Interaction between the Samba VFS subsystem and the modules</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2559495"></a>Initialization and registration</h3></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. @@ -256,7 +256,7 @@ NTSTATUS init_module(void) { return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "example", example_op_tuples); } -</pre></div><div class="sect2" title="How the Modules handle per connection data"><div class="titlepage"><div><div><h3 class="title"><a name="id2565713"></a>How the Modules handle per connection data</h3></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="id2559640"></a>How the Modules handle per connection data</h3></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; @@ -357,23 +357,23 @@ you can set this function pointer to NULL.</p></dd></dl></div><p>Some useful MAC (handle)->vfs_next.handles.sendfile,\ (tofd), (fsp), (fromfd), (header), (offset), (count))) ... -</pre></div></div><div class="sect1" title="Upgrading to the New VFS Interface"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2565913"></a>Upgrading to the New VFS Interface</h2></div></div></div><div class="sect2" title="Upgrading from 2.2.* and 3.0alpha modules"><div class="titlepage"><div><div><h3 class="title"><a name="id2565919"></a>Upgrading from 2.2.* and 3.0alpha modules</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> +</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2559841"></a>Upgrading to the New VFS Interface</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2559847"></a>Upgrading from 2.2.* and 3.0alpha modules</h3></div></div></div><div class="orderedlist"><ol type="1"><li><p> Add "vfs_handle_struct *handle, " as first parameter to all vfs operation functions. e.g. example_connect(connection_struct *conn, const char *service, const char *user); -> example_connect(vfs_handle_struct *handle, connection_struct *conn, const char *service, const char *user); -</p></li><li class="listitem"><p> +</p></li><li><p> Replace "default_vfs_ops." with "smb_vfs_next_". e.g. default_vfs_ops.connect(conn, service, user); -> smb_vfs_next_connect(conn, service, user); -</p></li><li class="listitem"><p> +</p></li><li><p> Uppercase all "smb_vfs_next_*" functions. e.g. smb_vfs_next_connect(conn, service, user); -> SMB_VFS_NEXT_CONNECT(conn, service, user); -</p></li><li class="listitem"><p> +</p></li><li><p> Add "handle, " as first parameter to all SMB_VFS_NEXT_*() calls. e.g. SMB_VFS_NEXT_CONNECT(conn, service, user); -> SMB_VFS_NEXT_CONNECT(handle, conn, service, user); -</p></li><li class="listitem"><p> +</p></li><li><p> (Only for 2.2.* modules) Convert the old struct vfs_ops example_ops to a vfs_op_tuple example_op_tuples[] array. @@ -462,9 +462,9 @@ static vfs_op_tuple example_op_tuples[] = { {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP} }; </pre><p> -</p></li><li class="listitem"><p> +</p></li><li><p> Move the example_op_tuples[] array to the end of the file. -</p></li><li class="listitem"><p> +</p></li><li><p> Add the init_module() function at the end of the file. e.g. </p><pre class="programlisting"> @@ -473,20 +473,20 @@ NTSTATUS init_module(void) return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,"example",example_op_tuples); } </pre><p> -</p></li><li class="listitem"><p> +</p></li><li><p> Check if your vfs_init() function does more then just prepare the vfs_ops structs or remember the struct smb_vfs_handle_struct. -</p><table border="0" summary="Simple list" class="simplelist"><tr><td>If NOT you can remove the vfs_init() function.</td></tr><tr><td>If YES decide if you want to move the code to the example_connect() operation or to the init_module(). And then remove vfs_init(). +</p><table class="simplelist" border="0" summary="Simple list"><tr><td>If NOT you can remove the vfs_init() function.</td></tr><tr><td>If YES decide if you want to move the code to the example_connect() operation or to the init_module(). And then remove vfs_init(). e.g. a debug class registration should go into init_module() and the allocation of private data should go to example_connect().</td></tr></table><p> -</p></li><li class="listitem"><p> +</p></li><li><p> (Only for 3.0alpha* modules) Check if your vfs_done() function contains needed code. -</p><table border="0" summary="Simple list" class="simplelist"><tr><td>If NOT you can remove the vfs_done() function.</td></tr><tr><td>If YES decide if you can move the code to the example_disconnect() operation. Otherwise register a SMB_EXIT_EVENT with smb_register_exit_event(); (Described in the <a class="link" href="modules.html" title="Chapter 8. Modules">modules section</a>) And then remove vfs_done(). e.g. the freeing of private data should go to example_disconnect(). +</p><table class="simplelist" border="0" summary="Simple list"><tr><td>If NOT you can remove the vfs_done() function.</td></tr><tr><td>If YES decide if you can move the code to the example_disconnect() operation. Otherwise register a SMB_EXIT_EVENT with smb_register_exit_event(); (Described in the <a class="link" href="modules.html" title="Chapter 8. Modules">modules section</a>) And then remove vfs_done(). e.g. the freeing of private data should go to example_disconnect(). </td></tr></table><p> -</p></li><li class="listitem"><p> +</p></li><li><p> Check if you have any global variables left. Decide if it wouldn't be better to have this data on a connection basis. -</p><table border="0" summary="Simple list" class="simplelist"><tr><td>If NOT leave them as they are. (e.g. this could be the variable for the private debug class.)</td></tr><tr><td>If YES pack all this data into a struct. You can use handle->data to point to such a struct on a per connection basis.</td></tr></table><p> +</p><table class="simplelist" border="0" summary="Simple list"><tr><td>If NOT leave them as they are. (e.g. this could be the variable for the private debug class.)</td></tr><tr><td>If YES pack all this data into a struct. You can use handle->data to point to such a struct on a per connection basis.</td></tr></table><p> e.g. if you have such a struct: </p><pre class="programlisting"> @@ -604,7 +604,7 @@ static int example_close(vfs_handle_struct *handle, files_struct *fsp, int fd) return SMB_VFS_NEXT_CLOSE(handle, fsp, fd); } </pre><p> -</p></li><li class="listitem"><p> +</p></li><li><p> To make it easy to build 3rd party modules it would be useful to provide configure.in, (configure), install.sh and Makefile.in with the module. (Take a look at the example in <code class="filename">examples/VFS</code>.) @@ -617,10 +617,10 @@ give you more warnings. The idea is that you can extend this <code class="filename">configure.in</code> and <code class="filename">Makefile.in</code> scripts for your module. -</p></li><li class="listitem"><p> +</p></li><li><p> Compiling & Testing... -</p><table border="0" summary="Simple list" class="simplelist"><tr><td><strong class="userinput"><code>./configure <code class="option">--enable-developer</code></code></strong> ...</td></tr><tr><td><strong class="userinput"><code>make</code></strong></td></tr><tr><td>Try to fix all compiler warnings</td></tr><tr><td><strong class="userinput"><code>make</code></strong></td></tr><tr><td>Testing, Testing, Testing ...</td></tr></table><p> -</p></li></ol></div></div></div><div class="sect1" title="Some Notes"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2566324"></a>Some Notes</h2></div></div></div><div class="sect2" title="Implement TRANSPARENT functions"><div class="titlepage"><div><div><h3 class="title"><a name="id2566329"></a>Implement TRANSPARENT functions</h3></div></div></div><p> +</p><table class="simplelist" border="0" summary="Simple list"><tr><td><strong class="userinput"><code>./configure <code class="option">--enable-developer</code></code></strong> ...</td></tr><tr><td><strong class="userinput"><code>make</code></strong></td></tr><tr><td>Try to fix all compiler warnings</td></tr><tr><td><strong class="userinput"><code>make</code></strong></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="id2560251"></a>Some Notes</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560257"></a>Implement TRANSPARENT functions</h3></div></div></div><p> Avoid writing functions like this: </p><pre class="programlisting"> @@ -631,7 +631,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" title="Implement OPAQUE functions"><div class="titlepage"><div><div><h3 class="title"><a name="id2566349"></a>Implement OPAQUE functions</h3></div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560276"></a>Implement OPAQUE functions</h3></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) diff --git a/docs/htmldocs/Samba3-Developers-Guide/wins.html b/docs/htmldocs/Samba3-Developers-Guide/wins.html index 3f49a20e7d..ea61d8f634 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/wins.html +++ b/docs/htmldocs/Samba3-Developers-Guide/wins.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 12. Samba WINS Internals</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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="parsing.html" title="Chapter 11. The smb.conf file"><link rel="next" href="pwencrypt.html" title="Chapter 13. LanMan and NT Password Encryption"></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 12. Samba WINS Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="parsing.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="pwencrypt.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 12. Samba WINS Internals"><div class="titlepage"><div><div><h2 class="title"><a name="wins"></a>Chapter 12. Samba WINS Internals</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Gerald</span> <span class="surname">Carter</span></h3></div></div><div><p class="pubdate">October 2002</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="wins.html#id2566747">WINS Failover</a></span></dt></dl></div><div class="sect1" title="WINS Failover"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2566747"></a>WINS Failover</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 12. Samba WINS Internals</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="pt03.html" title="Part III. Samba Subsystems"><link rel="prev" href="parsing.html" title="Chapter 11. The smb.conf file"><link rel="next" href="pwencrypt.html" title="Chapter 13. LanMan and NT Password Encryption"></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 12. Samba WINS Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="parsing.html">Prev</a> </td><th width="60%" align="center">Part III. Samba Subsystems</th><td width="20%" align="right"> <a accesskey="n" href="pwencrypt.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="wins"></a>Chapter 12. Samba WINS Internals</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Gerald</span> <span class="surname">Carter</span></h3></div></div><div><p class="pubdate">October 2002</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="wins.html#id2560674">WINS Failover</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2560674"></a>WINS Failover</h2></div></div></div><p> The current Samba codebase possesses the capability to use groups of WINS servers that share a common namespace for NetBIOS name registration and resolution. The formal parameter syntax is |