summaryrefslogtreecommitdiff
path: root/examples/sam/README
blob: 9e9fbb26db3f1e37147847a7c3510a773408505c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
README for Samba SAM Database examples
====================================================
26-08-2002 Stefan (metze) Metzmacher <metze@metzemix.de>

Every module MUST have a sam_version() function.

this is defined in include/sam.h:
#define SAM_MODULE_VERSIONING_MAGIC \
int sam_version(void)\
{\
	return SAM_INTERFACE_VERSION;\
}

You MUST add this line inside a module:
SAM_MODULE_VERSIONING_MAGIC


The sam_skel.c file in this directory contains a very basic example of 
a SAM plugin. It just prints the name of the function that is executed using
DEBUG. Maybe it's nice to include some of the arguments to the function in the 
future too..

New SAM plugins should go into the samba lib directory, (/usr/lib/samba/ 
for most distributions) and should be prefixed with 'sam_' and should go into the 
subdir sam/. The SAM subsystem will search in /usr/lib/samba/sam and fall back to 
/usr/lib/samba/ . 
An example path would be: 
/usr/lib/samba/sam/sam_skel.so