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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 20. Stackable VFS modules</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="previous" href="CUPS-printing.html" title="Chapter 19. CUPS Printing Support in Samba 3.0"><link rel="next" href="winbind.html" title="Chapter 21. Integrated Logon Support using Winbind"></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 20. Stackable VFS modules</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="CUPS-printing.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="winbind.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 20. Stackable VFS modules</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><tt class="email"><<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>></tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email"><<a href="mailto:jht@samba.org">jht@samba.org</a>></tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Alexander</span> <span class="surname">Bokovoy</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">Simo</span> <span class="surname">Sorce</span></h3></div></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="VFS.html#id2975746">Features and Benefits</a></dt><dt><a href="VFS.html#id2975763">Discussion</a></dt><dt><a href="VFS.html#id2975814">Included modules</a></dt><dd><dl><dt><a href="VFS.html#id2974410">audit</a></dt><dt><a href="VFS.html#id2974449">extd_audit</a></dt><dt><a href="VFS.html#id2974571">fake_perms</a></dt><dt><a href="VFS.html#id2974591">recycle</a></dt><dt><a href="VFS.html#id2974730">netatalk</a></dt></dl></dd><dt><a href="VFS.html#id2974775">VFS modules available elsewhere</a></dt><dd><dl><dt><a href="VFS.html#id2974797">DatabaseFS</a></dt><dt><a href="VFS.html#id2974851">vscan</a></dt></dl></dd><dt><a href="VFS.html#id2974880">Common Errors</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2975746"></a>Features and Benefits</h2></div></div><div></div></div><p>
Since Samba-3, there is support for stackable VFS(Virtual File System) modules.
Samba passes each request to access the unix file system thru the loaded VFS modules.
This chapter covers all the modules that come with the samba source and references to
some external modules.
</p></div><div xmlns:ns69="" class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2975763"></a>Discussion</h2></div></div><div></div></div><p>
If not supplied with your platform distribution binary Samba package you may have problems
to compile these modules, as shared libraries are compiled and linked in different ways
on different systems. They currently have been tested against GNU/Linux and IRIX.
</p><ns69:p>
To use the VFS modules, create a share similar to the one below. The
important parameter is the <i class="parameter"><tt>vfs object</tt></i> parameter which must point to
the exact pathname of the shared library objects. For example, to log all access
to files and use a recycle bin:
</ns69:p><pre class="programlisting">
[audit]
comment = Audited /data directory
path = /data
vfs object = /path/to/audit.so /path/to/recycle.so
writeable = yes
browseable = yes
</pre><ns69:p>
</ns69:p><p>
The modules are used in the order they are specified.
</p><p>
Further documentation on writing VFS modules for Samba can be found in
the Samba Developers Guide.
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2975814"></a>Included modules</h2></div></div><div></div></div><div xmlns:ns70="" class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2974410"></a>audit</h3></div></div><div></div></div><ns70:p>
A simple module to audit file access to the syslog
facility. The following operations are logged:
</ns70:p><table class="simplelist" border="0" summary="Simple list"><tr><td>share</td></tr><tr><td>connect/disconnect</td></tr><tr><td>directory opens/create/remove</td></tr><tr><td>file open/close/rename/unlink/chmod</td></tr></table><ns70:p>
</ns70:p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2974449"></a>extd_audit</h3></div></div><div></div></div><p>
This module is identical with the <span class="emphasis"><em>audit</em></span> module above except
that it sends audit logs to both syslog as well as the smbd log file/s. The
loglevel for this module is set in the smb.conf file.
</p><p>
The logging information that will be written to the smbd log file is controlled by
the <i class="parameter"><tt>log level</tt></i> parameter in <tt class="filename">smb.conf</tt>. The
following information will be recorded:
</p><div class="table"><a name="id2974488"></a><p class="title"><b>Table 20.1. Extended Auditing Log Information</b></p><table summary="Extended Auditing Log Information" border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Log Level</th><th align="center">Log Details - File and Directory Operations</th></tr></thead><tbody><tr><td align="center">0</td><td align="left">Creation / Deletion</td></tr><tr><td align="center">1</td><td align="left">Create / Delete / Rename / Permission Changes</td></tr><tr><td align="center">2</td><td align="left">Create / Delete / Rename / Perm Change / Open / Close</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2974571"></a>fake_perms</h3></div></div><div></div></div><p>
This module was created to allow Roaming Profile files and directories to be set (on the Samba server
under Unix) as read only. This module will if installed on the Profiles share will report to the client
that the Profile files and directories are writable. This satisfies the client even though the files
will never be overwritten as the client logs out or shuts down.
</p></div><div xmlns:ns71="" class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2974591"></a>recycle</h3></div></div><div></div></div><p>
A recycle-bin like module. When used any unlink call
will be intercepted and files moved to the recycle
directory instead of being deleted.
</p><ns71:p>Supported options:
</ns71:p><div class="variablelist"><dl><dt><span class="term">vfs_recycle_bin:repository</span></dt><dd><p>FIXME</p></dd><dt><span class="term">vfs_recycle_bin:keeptree</span></dt><dd><p>FIXME</p></dd><dt><span class="term">vfs_recycle_bin:versions</span></dt><dd><p>FIXME</p></dd><dt><span class="term">vfs_recycle_bin:touch</span></dt><dd><p>FIXME</p></dd><dt><span class="term">vfs_recycle_bin:maxsize</span></dt><dd><p>FIXME</p></dd><dt><span class="term">vfs_recycle_bin:exclude</span></dt><dd><p>FIXME</p></dd><dt><span class="term">vfs_recycle_bin:exclude_dir</span></dt><dd><p>FIXME</p></dd><dt><span class="term">vfs_recycle_bin:noversions</span></dt><dd><p>FIXME</p></dd></dl></div><ns71:p>
</ns71:p></div><div xmlns:ns72="" class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2974730"></a>netatalk</h3></div></div><div></div></div><p>
A netatalk module, that will ease co-existence of samba and
netatalk file sharing services.
</p><ns72:p>Advantages compared to the old netatalk module:
</ns72:p><table class="simplelist" border="0" summary="Simple list"><tr><td>it doesn't care about creating of .AppleDouble forks, just keeps them in sync</td></tr><tr><td>if a share in <tt class="filename">smb.conf</tt> doesn't contain .AppleDouble item in hide or veto list, it will be added automatically</td></tr></table><ns72:p>
</ns72:p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2974775"></a>VFS modules available elsewhere</h2></div></div><div></div></div><p>
This section contains a listing of various other VFS modules that
have been posted but don't currently reside in the Samba CVS
tree for one reason or another (e.g. it is easy for the maintainer
to have his or her own CVS tree).
</p><p>
No statements about the stability or functionality of any module
should be implied due to its presence here.
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2974797"></a>DatabaseFS</h3></div></div><div></div></div><p>
URL: <a href="http://www.css.tayloru.edu/~elorimer/databasefs/index.php" target="_top">http://www.css.tayloru.edu/~elorimer/databasefs/index.php</a>
</p><p>By <a href="mailto:elorimer@css.tayloru.edu" target="_top">Eric Lorimer</a>.</p><p>
I have created a VFS module which implements a fairly complete read-only
filesystem. It presents information from a database as a filesystem in
a modular and generic way to allow different databases to be used
(originally designed for organizing MP3s under directories such as
"Artists," "Song Keywords," etc... I have since applied it to a student
roster database very easily). The directory structure is stored in the
database itself and the module makes no assumptions about the database
structure beyond the table it requires to run.
</p><p>
Any feedback would be appreciated: comments, suggestions, patches,
etc... If nothing else, hopefully it might prove useful for someone
else who wishes to create a virtual filesystem.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2974851"></a>vscan</h3></div></div><div></div></div><p>URL: <a href="http://www.openantivirus.org/" target="_top">http://www.openantivirus.org/</a></p><p>
samba-vscan is a proof-of-concept module for Samba, which
uses the VFS (virtual file system) features of Samba 2.2.x/3.0
alphaX. Of couse, Samba has to be compiled with VFS support.
samba-vscan supports various virus scanners and is maintained
by Rainer Link.
</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2974880"></a>Common Errors</h2></div></div><div></div></div><p>
There must be some gotchas we should record here! Jelmer???
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="CUPS-printing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="winbind.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 19. CUPS Printing Support in Samba 3.0 </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 21. Integrated Logon Support using Winbind</td></tr></table></div></body></html>
|