5 <author><firstname>Alexander</firstname><surname>Bokovoy</surname></author>
6 <author><firstname>Tim</firstname><surname>Potter</surname></author>
7 <author><firstname>Simo</firstname><surname>Sorce</surname></author>
9 <title>Stackable VFS modules</title>
12 <title>Introduction and configuration</title>
15 Since samba 3.0, samba supports stackable VFS(Virtual File System) modules.
16 Samba passes each request to access the unix file system thru the loaded VFS modules.
17 This chapter covers all the modules that come with the samba source and references to
18 some external modules.
22 You may have problems to compile these modules, as shared libraries are
23 compiled and linked in different ways on different systems.
24 They currently have been tested against GNU/linux and IRIX.
28 To use the VFS modules, create a share similar to the one below. The
29 important parameter is the <command>vfs object</command> parameter which must point to
30 the exact pathname of the shared library objects. For example, to log all access
31 to files and use a recycle bin:
35 comment = Audited /data directory
37 vfs object = /path/to/audit.so /path/to/recycle.so
44 The modules are used in the order they are specified.
48 Further documentation on writing VFS modules for Samba can be found in
49 the Samba Developers Guide.
55 <title>Included modules</title>
59 <para>A simple module to audit file access to the syslog
60 facility. The following operations are logged:
62 <member>share</member>
63 <member>connect/disconnect</member>
64 <member>directory opens/create/remove</member>
65 <member>file open/close/rename/unlink/chmod</member>
71 <title>extd_audit</title>
73 This module is identical with the <emphasis>audit</emphasis> module above except
74 that it sends audit logs to both syslog as well as the smbd log file/s. The
75 loglevel for this module is set in the smb.conf file.
79 The logging information that will be written to the smbd log file is controlled by
80 the <emphasis>log level</emphasis> parameter in <filename>smb.conf</filename>. The
81 following information will be recorded:
84 <table frame="all"><title>Extended Auditing Log Information</title>
85 <tgroup cols="2" align="center">
87 <row><entry align="center">Log Level</entry><entry>Log Details - File and Directory Operations</entry></row>
90 <row><entry align="center">0</entry><entry align="left">Creation / Deletion</entry></row>
91 <row><entry align="center">1</entry><entry align="left">Create / Delete / Rename / Permission Changes</entry></row>
92 <row><entry align="center">2</entry><entry align="left">Create / Delete / Rename / Perm Change / Open / Close</entry></row>
100 <title>recycle</title>
102 A recycle-bin like module. When used any unlink call
103 will be intercepted and files moved to the recycle
104 directory instead of being deleted.
107 <para>Supported options:
110 <term>vfs_recycle_bin:repository</term>
111 <listitem><para>FIXME</para></listitem>
115 <term>vfs_recycle_bin:keeptree</term>
116 <listitem><para>FIXME</para></listitem>
120 <term>vfs_recycle_bin:versions</term>
121 <listitem><para>FIXME</para></listitem>
125 <term>vfs_recycle_bin:touch</term>
126 <listitem><para>FIXME</para></listitem>
130 <term>vfs_recycle_bin:maxsize</term>
131 <listitem><para>FIXME</para></listitem>
135 <term>vfs_recycle_bin:exclude</term>
136 <listitem><para>FIXME</para></listitem>
140 <term>vfs_recycle_bin:exclude_dir</term>
141 <listitem><para>FIXME</para></listitem>
145 <term>vfs_recycle_bin:noversions</term>
146 <listitem><para>FIXME</para></listitem>
154 <title>netatalk</title>
156 A netatalk module, that will ease co-existence of samba and
157 netatalk file sharing services.
160 <para>Advantages compared to the old netatalk module:
162 <member>it doesn't care about creating of .AppleDouble forks, just keeps them in sync</member>
163 <member>if share in smb.conf doesn't contain .AppleDouble item in hide or veto list, it will be added automatically</member>
172 <title>VFS modules available elsewhere</title>
175 This section contains a listing of various other VFS modules that
176 have been posted but don't currently reside in the Samba CVS
177 tree for one reason or another (e.g. it is easy for the maintainer
178 to have his or her own CVS tree).
182 No statemets about the stability or functionality of any module
183 should be implied due to its presence here.
187 <title>DatabaseFS</title>
190 URL: <ulink url="http://www.css.tayloru.edu/~elorimer/databasefs/index.php">http://www.css.tayloru.edu/~elorimer/databasefs/index.php</ulink>
193 <para>By <ulink url="mailto:elorimer@css.tayloru.edu">Eric Lorimer</ulink>.</para>
196 I have created a VFS module which implements a fairly complete read-only
197 filesystem. It presents information from a database as a filesystem in
198 a modular and generic way to allow different databases to be used
199 (originally designed for organizing MP3s under directories such as
200 "Artists," "Song Keywords," etc... I have since applied it to a student
201 roster database very easily). The directory structure is stored in the
202 database itself and the module makes no assumptions about the database
203 structure beyond the table it requires to run.
207 Any feedback would be appreciated: comments, suggestions, patches,
208 etc... If nothing else, hopefully it might prove useful for someone
209 else who wishes to create a virtual filesystem.
216 <para>URL: <ulink url="http://www.openantivirus.org/">http://www.openantivirus.org/</ulink></para>
219 samba-vscan is a proof-of-concept module for Samba, which
220 uses the VFS (virtual file system) features of Samba 2.2.x/3.0
221 alphaX. Of couse, Samba has to be compiled with VFS support.
222 samba-vscan supports various virus scanners and is maintained