summaryrefslogtreecommitdiffstats
path: root/examples/VFS/README
blob: 75425b5d1899d58832ee6800bf7e7c56d955d456 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
README for Samba Virtual File System (VFS) Examples
===================================================

This directory contains some sample code to demonstrate VFS
construction.  The following VFS modules are given:

	skel
		A skeleton VFS module.  When used, this module simply
		passes all requests back to the disk functions (i.e it
		operates as a passthrough filter).  It should be
		useful as a starting point for developing new VFS
		modules. 

	audit
		A simple module to audit file access to the syslog
		facility.  The following operations are logged: share
		connect/disconnect, directory opens/create/remove,
		file open/close/rename/unlink/chmod.

	recycle
		Add a recycle bin facility to a samba share
		Copy this to somewhere like /usr/local/samba/lib/recycle.so
		and then add these options on a per-share basis to enable the
		recycle bin :

		        vfs object = /usr/local/samba/lib/recycle.so
		        vfs module options= recycle=.recycle

	block/

		A directory containing a sample module by Ronald Kuetemeier
		<ronald@kuetemeier.com> to block named symbolic link following.
		Note: Config file is in /etc/samba/samba-block.conf

The libtool program, available from your favourite GNU software
archive, is required to compile these programs.

To use the VFS modules, create a share similar to the one below.  The
important parameter is the 'vfs object' parameter which must point to
the exact pathname of the shared library object.

       [audit]
                comment = Audited /data directory
                path = /data
                vfs object = /path/to/audit.so
                writeable = yes
                browseable = yes

Further documentation on writing VFS modules for Samba can be found in
docs directory of the Samba source distribution.