s3-vfs: add copy_chunk vfs hooks
[Samba/gbeck.git] / docs-xml / manpages / vfs_full_audit.8.xml
blob312bc25078d00e38c0189db12493a66cb9d67b96
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="vfs_full_audit.8">
5 <refmeta>
6         <refentrytitle>vfs_full_audit</refentrytitle>
7         <manvolnum>8</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10         <refmiscinfo class="version">4.0</refmiscinfo>
11 </refmeta>
14 <refnamediv>
15         <refname>vfs_full_audit</refname>
16         <refpurpose>record Samba VFS operations in the system log</refpurpose>
17 </refnamediv>
19 <refsynopsisdiv>
20         <cmdsynopsis>
21                 <command>vfs objects = full_audit</command>
22         </cmdsynopsis>
23 </refsynopsisdiv>
25 <refsect1>
26         <title>DESCRIPTION</title>
28         <para>This VFS module is part of the
29         <citerefentry><refentrytitle>samba</refentrytitle>
30         <manvolnum>7</manvolnum></citerefentry> suite.</para>
32         <para>The <command>vfs_full_audit</command> VFS module records selected
33         client operations to the system log using
34         <citerefentry><refentrytitle>syslog</refentrytitle>
35         <manvolnum>3</manvolnum></citerefentry>.</para>
37         <para><command>vfs_full_audit</command> is able to record the
38         complete set of Samba VFS operations:</para>
40         <simplelist>
41         <member>chdir</member>
42         <member>chflags</member>
43         <member>chmod</member>
44         <member>chmod_acl</member>
45         <member>chown</member>
46         <member>close</member>
47         <member>closedir</member>
48         <member>connect</member>
49         <member>copy_chunk_send</member>
50         <member>copy_chunk_recv</member>
51         <member>disconnect</member>
52         <member>disk_free</member>
53         <member>fchmod</member>
54         <member>fchmod_acl</member>
55         <member>fchown</member>
56         <member>fget_nt_acl</member>
57         <member>fgetxattr</member>
58         <member>flistxattr</member>
59         <member>fremovexattr</member>
60         <member>fset_nt_acl</member>
61         <member>fsetxattr</member>
62         <member>fstat</member>
63         <member>fsync</member>
64         <member>ftruncate</member>
65         <member>get_nt_acl</member>
66         <member>get_quota</member>
67         <member>get_shadow_copy_data</member>
68         <member>getlock</member>
69         <member>getwd</member>
70         <member>getxattr</member>
71         <member>kernel_flock</member>
72         <member>link</member>
73         <member>linux_setlease</member>
74         <member>listxattr</member>
75         <member>lock</member>
76         <member>lseek</member>
77         <member>lstat</member>
78         <member>mkdir</member>
79         <member>mknod</member>
80         <member>open</member>
81         <member>opendir</member>
82         <member>pread</member>
83         <member>pwrite</member>
84         <member>read</member>
85         <member>readdir</member>
86         <member>readlink</member>
87         <member>realpath</member>
88         <member>removexattr</member>
89         <member>rename</member>
90         <member>rewinddir</member>
91         <member>rmdir</member>
92         <member>seekdir</member>
93         <member>sendfile</member>
94         <member>set_nt_acl</member>
95         <member>set_quota</member>
96         <member>setxattr</member>
97         <member>stat</member>
98         <member>statvfs</member>
99         <member>symlink</member>
100         <member>sys_acl_delete_def_file</member>
101         <member>sys_acl_get_fd</member>
102         <member>sys_acl_get_file</member>
103         <member>sys_acl_set_fd</member>
104         <member>sys_acl_set_file</member>
105         <member>telldir</member>
106         <member>unlink</member>
107         <member>utime</member>
108         <member>write</member>
109         </simplelist>
111         <para>In addition to these operations,
112         <command>vfs_full_audit</command> recognizes the special operation
113         names &quot;all&quot; and &quot;none &quot;, which refer to all
114         the VFS operations and none of the VFS operations respectively.
115         </para>
117         <para><command>vfs_full_audit</command> records operations in fixed
118         format consisting of fields separated by '|' characters. The
119         format is: </para>
120         <programlisting>
121                 smbd_audit: PREFIX|OPERATION|RESULT|FILE
122         </programlisting>
124         <para>The record fields are:</para>
126         <itemizedlist>
127         <listitem><para><command>PREFIX</command> - the result of the full_audit:prefix string after variable substitutions</para></listitem>
128         <listitem><para><command>OPERATION</command> - the name of the VFS operation</para></listitem>
129         <listitem><para><command>RESULT</command> - whether the operation succeeded or failed</para></listitem>
130         <listitem><para><command>FILE</command> - the name of the file or directory the operation was performed on</para></listitem>
132         </itemizedlist>
134         <para>This module is stackable.</para>
136 </refsect1>
139 <refsect1>
140         <title>OPTIONS</title>
142         <variablelist>
144                 <varlistentry>
145                 <term>vfs_full_audit:prefix = STRING</term>
146                 <listitem>
147                 <para>Prepend audit messages with STRING. STRING is
148                 processed for standard substitution variables listed in
149                 <citerefentry><refentrytitle>smb.conf</refentrytitle>
150                 <manvolnum>5</manvolnum></citerefentry>. The default
151                 prefix is &quot;%u|%I&quot;. </para>
153                 </listitem>
154                 </varlistentry>
156                 <varlistentry>
157                 <term>vfs_full_audit:success = LIST</term>
158                 <listitem>
159                 <para>LIST is a list of VFS operations that should be
160                 recorded if they succeed. Operations are specified using
161                 the names listed above. Operations can be unset by prefixing
162                 the names with "!".
163                 </para>
165                 </listitem>
166                 </varlistentry>
168                 <varlistentry>
169                 <term>vfs_full_audit:failure = LIST</term>
170                 <listitem>
171                 <para>LIST is a list of VFS operations that should be
172                 recorded if they failed. Operations are specified using
173                 the names listed above. Operations can be unset by prefixing
174                 the names with "!".
175                 </para>
177                 </listitem>
178                 </varlistentry>
180                 <varlistentry>
181                 <term>full_audit:facility = FACILITY</term>
182                 <listitem>
183                 <para>Log messages to the named
184                 <citerefentry><refentrytitle>syslog</refentrytitle>
185                 <manvolnum>3</manvolnum></citerefentry> facility.
187                 </para>
189                 </listitem>
190                 </varlistentry>
192                 <varlistentry>
193                 <term>full_audit:priority = PRIORITY</term>
194                 <listitem>
195                 <para>Log messages with the named
196                 <citerefentry><refentrytitle>syslog</refentrytitle>
197                 <manvolnum>3</manvolnum></citerefentry> priority.
198                 </para>
200                 </listitem>
201                 </varlistentry>
203         </variablelist>
204 </refsect1>
206 <refsect1>
207         <title>EXAMPLES</title>
209         <para>Log file and directory open operations on the [records]
210         share using the LOCAL7 facility and ALERT priority, including
211         the username and IP address. Logging excludes the open VFS function
212         on failures:</para>
214 <programlisting>
215         <smbconfsection name="[records]"/>
216         <smbconfoption name="path">/data/records</smbconfoption>
217         <smbconfoption name="vfs objects">full_audit</smbconfoption>
218         <smbconfoption name="full_audit:prefix">%u|%I</smbconfoption>
219         <smbconfoption name="full_audit:success">open opendir</smbconfoption>
220         <smbconfoption name="full_audit:failure">all !open</smbconfoption>
221         <smbconfoption name="full_audit:facility">LOCAL7</smbconfoption>
222         <smbconfoption name="full_audit:priority">ALERT</smbconfoption>
223 </programlisting>
225 </refsect1>
227 <refsect1>
228         <title>VERSION</title>
229         <para>This man page is correct for version 3.0.25 of the Samba suite.
230         </para>
231 </refsect1>
233 <refsect1>
234         <title>AUTHOR</title>
236         <para>The original Samba software and related utilities
237         were created by Andrew Tridgell. Samba is now developed
238         by the Samba Team as an Open Source project similar
239         to the way the Linux kernel is developed.</para>
241 </refsect1>
243 </refentry>