From d069dacb6e17866dd5d3862e1837a9cae008644f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 15 Aug 2003 18:26:34 +0000 Subject: Regenerate docs (This used to be commit dc33e94161e4fc1ca6bf66a321c708c89bb276e3) --- docs/htmldocs/Samba-Developers-Guide.html | 36 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'docs/htmldocs/Samba-Developers-Guide.html') diff --git a/docs/htmldocs/Samba-Developers-Guide.html b/docs/htmldocs/Samba-Developers-Guide.html index 64c78025ed..c16b48441b 100644 --- a/docs/htmldocs/Samba-Developers-Guide.html +++ b/docs/htmldocs/Samba-Developers-Guide.html @@ -34,7 +34,7 @@ Print Queue TDB's ChangeID and Client Caching of Printer Information
Windows NT/2K Printer Change Notify -
12. Samba WINS Internals
WINS Failover
13. The Upcoming SAM System
Security in the 'new SAM'
Standalone from UNIX
Handles and Races in the new SAM
Layers
Application
SAM Interface
SAM Modules
SAM Modules
Special Module: sam_passdb
sam_ads
Memory Management
Testing
14. LanMan and NT Password Encryption
Introduction
How does it work?
The smbpasswd file
15. Modules
Advantages
Loading modules
Static modules
Shared modules
Writing modules
Static/Shared selection in configure.in
16. RPC Pluggable Modules
About
General Overview
17. VFS Modules
The Samba (Posix) VFS layer
The general interface
Possible VFS operation layers
The Interaction between the Samba VFS subsystem and the modules
Initialization and registration
How the Modules handle per connection data
Upgrading to the New VFS Interface
Upgrading from 2.2.* and 3.0aplha modules
Some Notes
Implement TRANSPARENT functions
Implement OPAQUE functions
18. Notes to packagers
Versioning
Modules
19. Contributing code

Attributions

Definition of NetBIOS Protocol and Name Resolution Modes

  • Luke Leighton

Samba Architecture

  • Dan Shearer

The samba DEBUG system

  • Chris Hertel

Coding Suggestions

  • Steve French

  • Simo Sorce

  • Andrew Bartlett

  • Tim Potter

  • Martin Pool

Samba Internals

The smb.conf file

  • Chris Hertel

NetBIOS in a Unix World

  • Andrew Tridgell

Tracing samba system calls

  • Andrew Tridgell

Finding useful information on windows

NT Domain RPC's

Samba Printing Internals

  • Gerald Carter

Samba WINS Internals

  • Gerald Carter

The Upcoming SAM System

  • Andrew Bartlett

LanMan and NT Password Encryption

Modules

RPC Pluggable Modules

VFS Modules

Notes to packagers

  • Jelmer Vernooij

Contributing code

Chapter 1. Definition of NetBIOS Protocol and Name Resolution Modes

Luke Leighton

12 June 1997

Attributions

Definition of NetBIOS Protocol and Name Resolution Modes

  • Luke Leighton

Samba Architecture

  • Dan Shearer

The samba DEBUG system

  • Chris Hertel

Coding Suggestions

  • Steve French

  • Simo Sorce

  • Andrew Bartlett

  • Tim Potter

  • Martin Pool

Samba Internals

The smb.conf file

  • Chris Hertel

NetBIOS in a Unix World

  • Andrew Tridgell

Tracing samba system calls

  • Andrew Tridgell

Finding useful information on windows

NT Domain RPC's

Samba Printing Internals

  • Gerald Carter

Samba WINS Internals

  • Gerald Carter

The Upcoming SAM System

  • Andrew Bartlett

LanMan and NT Password Encryption

Modules

RPC Pluggable Modules

VFS Modules

Notes to packagers

  • Jelmer Vernooij

Contributing code

Chapter 1. Definition of NetBIOS Protocol and Name Resolution Modes

Luke Leighton

12 June 1997

NETBIOS

NetBIOS runs over the following tranports: TCP/IP; NetBEUI and IPX/SPX. Samba only uses NetBIOS over TCP/IP. For details on the TCP/IP NetBIOS Session Service NetBIOS Datagram Service, and NetBIOS Names, see @@ -1998,22 +1998,24 @@ On the bottom of configure.in, SMB_MODULE() should be called for each module and SMB_SUBSYSTEM() for each subsystem.

Syntax:

 SMB_MODULE(subsystem_backend, object files, plugin name, subsystem name, static_action, shared_action)
-SMB_SUBSYSTEM(subsystem)
-

Also, make sure to add the correct directives to -Makefile.in. @SUBSYSTEM_STATIC@ -will be replaced with a list of objects files of the modules that need to -be linked in statically. @SUBSYSTEM_MODULES@ will +SMB_SUBSYSTEM(subsystem,depfile) +

The depfile for a certain subsystem is the file that calls the +initialisation functions for the statically built in modules.

+@SUBSYSTEM_MODULES@ in Makefile.in will be replaced with the names of the plugins to build.

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 static_init_subsystem; calls need to be rebuilded. -

Chapter 16. RPC Pluggable Modules

Anthony Liguori

Jelmer Vernooij

Samba Team

January 2003

Table of Contents

About
General Overview

About

+

Note

+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.

Chapter 16. RPC Pluggable Modules

Anthony Liguori

Jelmer Vernooij

Samba Team

January 2003

Table of Contents

About
General Overview

About

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. -

General Overview

+

General Overview

When an RPC call is sent to smbd, smbd tries to load a shared library by the name librpc_<pipename>.so to handle the call if it doesn't know how to handle the call internally. For instance, LSA calls @@ -2030,7 +2032,7 @@ NTSTATUS rpc_pipe_register_commands(int version, const char *clnt, const char *s argument.

clnt

the Client name of the named pipe

srv

the Server name of the named pipe

cmds

a list of api_structs that map RPC ordinal numbers to function calls

size

the number of api_structs contained in cmds

See rpc_server/srv_reg.c and rpc_server/srv_reg_nt.c for a small example of how to use this library. -

Chapter 17. VFS Modules

Alexander Bokovoy

Stefan Metzmacher

27 May 2003

The Samba (Posix) VFS layer

The general interface

+

Chapter 17. VFS Modules

Alexander Bokovoy

Stefan Metzmacher

27 May 2003

The Samba (Posix) VFS layer

The general interface

Each VFS operation has a vfs_op_type, a function pointer and a handle pointer in the struct vfs_ops and tree macros to make it easier to call the operations. (Take a look at include/vfs.h and include/vfs_macros.h.) @@ -2126,7 +2128,7 @@ DO NOT ACCESS conn->vfs.ops.* directly !!! (tofd), (fsp), (fromfd), (header), (offset), (count))) ... -

Possible VFS operation layers

+

Possible VFS operation layers

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. @@ -2155,7 +2157,7 @@ typedef enum _vfs_op_layer { SMB_VFS_LAYER_SCANNER /* - Checks data and possibly initiates additional */ /* file activity like logging to files _inside_ samba VFS */ } vfs_op_layer; -

The Interaction between the Samba VFS subsystem and the modules

Initialization and registration

+

The Interaction between the Samba VFS subsystem and the modules

Initialization and registration

As each Samba module a VFS module should have a

NTSTATUS vfs_example_init(void);

function if it's staticly linked to samba or

NTSTATUS init_module(void);

function if it's a shared module. @@ -2195,7 +2197,7 @@ NTSTATUS init_module(void) { return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "example", example_op_tuples); } -

How the Modules handle per connection data

Each VFS function has as first parameter a pointer to the modules vfs_handle_struct. +

How the Modules handle per connection data

Each VFS function has as first parameter a pointer to the modules vfs_handle_struct.

 typedef struct vfs_handle_struct {
 	struct vfs_handle_struct  *next, *prev;
@@ -2296,7 +2298,7 @@ you can set this function pointer to NULL.

Some useful MAC (handle)->vfs_next.handles.sendfile,\ (tofd), (fsp), (fromfd), (header), (offset), (count))) ... -

Upgrading to the New VFS Interface

Upgrading from 2.2.* and 3.0aplha modules

  1. +

Upgrading to the New VFS Interface

Upgrading from 2.2.* and 3.0aplha modules

  1. 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); @@ -2559,7 +2561,7 @@ for your module.

  2. Compiling & Testing...

    ./configure --enable-developer ...
    make
    Try to fix all compiler warnings
    make
    Testing, Testing, Testing ...

    -

Some Notes

Implement TRANSPARENT functions

+

Some Notes

Implement TRANSPARENT functions

Avoid writing functions like this:

@@ -2570,7 +2572,7 @@ static int example_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
 

Overload only the functions you really need to! -

Implement OPAQUE functions

+

Implement OPAQUE functions

If you want to just implement a better version of a default samba opaque function (e.g. like a disk_free() function for a special filesystem) @@ -2590,12 +2592,12 @@ static int example_rename(vfs_handle_struct *handle, connection_struct *conn, errno = ENOSYS; return -1; } -

Chapter 18. Notes to packagers

Jelmer Vernooij

Table of Contents

Versioning
Modules

Versioning

Please, please update the version number in +

Chapter 18. Notes to packagers

Jelmer Vernooij

Table of Contents

Versioning
Modules

Versioning

Please, please update the version number in source/include/version.h to include the versioning of your package. This makes it easier to distinguish standard samba builds from custom-build samba builds (distributions often patch packages). For example, a good version would be:

 Version 2.999+3.0.alpha21-5 for Debian
-

Modules

Samba now has support for building parts of samba as plugins. This +

Modules

Samba now has support for building parts of samba as plugins. This makes it possible to, for example, put ldap or mysql support in a seperate package, thus making it possible to have a normal samba package not depending on ldap or mysql. To build as much parts of samba -- cgit