s3-smbd: Check return code of SMB_VFS_{L}STAT.
[Samba/bb.git] / docs-xml / manpages / vfs_full_audit.8.xml
bloba44924a8f64293c439e09d680e5f76ef6d17ba4d
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>disconnect</member>
50         <member>disk_free</member>
51         <member>fchmod</member>
52         <member>fchmod_acl</member>
53         <member>fchown</member>
54         <member>fget_nt_acl</member>
55         <member>fgetxattr</member>
56         <member>flistxattr</member>
57         <member>fremovexattr</member>
58         <member>fset_nt_acl</member>
59         <member>fsetxattr</member>
60         <member>fstat</member>
61         <member>fsync</member>
62         <member>ftruncate</member>
63         <member>get_nt_acl</member>
64         <member>get_quota</member>
65         <member>get_shadow_copy_data</member>
66         <member>getlock</member>
67         <member>getwd</member>
68         <member>getxattr</member>
69         <member>kernel_flock</member>
70         <member>link</member>
71         <member>linux_setlease</member>
72         <member>listxattr</member>
73         <member>lock</member>
74         <member>lseek</member>
75         <member>lstat</member>
76         <member>mkdir</member>
77         <member>mknod</member>
78         <member>open</member>
79         <member>opendir</member>
80         <member>pread</member>
81         <member>pwrite</member>
82         <member>read</member>
83         <member>readdir</member>
84         <member>readlink</member>
85         <member>realpath</member>
86         <member>removexattr</member>
87         <member>rename</member>
88         <member>rewinddir</member>
89         <member>rmdir</member>
90         <member>seekdir</member>
91         <member>sendfile</member>
92         <member>set_nt_acl</member>
93         <member>set_quota</member>
94         <member>setxattr</member>
95         <member>stat</member>
96         <member>statvfs</member>
97         <member>symlink</member>
98         <member>sys_acl_delete_def_file</member>
99         <member>sys_acl_get_fd</member>
100         <member>sys_acl_get_file</member>
101         <member>sys_acl_set_fd</member>
102         <member>sys_acl_set_file</member>
103         <member>telldir</member>
104         <member>unlink</member>
105         <member>utime</member>
106         <member>write</member>
107         </simplelist>
109         <para>In addition to these operations,
110         <command>vfs_full_audit</command> recognizes the special operation
111         names &quot;all&quot; and &quot;none &quot;, which refer to all
112         the VFS operations and none of the VFS operations respectively.
113         </para>
115         <para><command>vfs_full_audit</command> records operations in fixed
116         format consisting of fields separated by '|' characters. The
117         format is: </para>
118         <programlisting>
119                 smbd_audit: PREFIX|OPERATION|RESULT|FILE
120         </programlisting>
122         <para>The record fields are:</para>
124         <itemizedlist>
125         <listitem><para><command>PREFIX</command> - the result of the full_audit:prefix string after variable substitutions</para></listitem>
126         <listitem><para><command>OPERATION</command> - the name of the VFS operation</para></listitem>
127         <listitem><para><command>RESULT</command> - whether the operation succeeded or failed</para></listitem>
128         <listitem><para><command>FILE</command> - the name of the file or directory the operation was performed on</para></listitem>
130         </itemizedlist>
132         <para>This module is stackable.</para>
134 </refsect1>
137 <refsect1>
138         <title>OPTIONS</title>
140         <variablelist>
142                 <varlistentry>
143                 <term>vfs_full_audit:prefix = STRING</term>
144                 <listitem>
145                 <para>Prepend audit messages with STRING. STRING is
146                 processed for standard substitution variables listed in
147                 <citerefentry><refentrytitle>smb.conf</refentrytitle>
148                 <manvolnum>5</manvolnum></citerefentry>. The default
149                 prefix is &quot;%u|%I&quot;. </para>
151                 </listitem>
152                 </varlistentry>
154                 <varlistentry>
155                 <term>vfs_full_audit:success = LIST</term>
156                 <listitem>
157                 <para>LIST is a list of VFS operations that should be
158                 recorded if they succeed. Operations are specified using
159                 the names listed above. Operations can be unset by prefixing
160                 the names with "!".
161                 </para>
163                 </listitem>
164                 </varlistentry>
166                 <varlistentry>
167                 <term>vfs_full_audit:failure = LIST</term>
168                 <listitem>
169                 <para>LIST is a list of VFS operations that should be
170                 recorded if they failed. Operations are specified using
171                 the names listed above. Operations can be unset by prefixing
172                 the names with "!".
173                 </para>
175                 </listitem>
176                 </varlistentry>
178                 <varlistentry>
179                 <term>full_audit:facility = FACILITY</term>
180                 <listitem>
181                 <para>Log messages to the named
182                 <citerefentry><refentrytitle>syslog</refentrytitle>
183                 <manvolnum>3</manvolnum></citerefentry> facility.
185                 </para>
187                 </listitem>
188                 </varlistentry>
190                 <varlistentry>
191                 <term>full_audit:priority = PRIORITY</term>
192                 <listitem>
193                 <para>Log messages with the named
194                 <citerefentry><refentrytitle>syslog</refentrytitle>
195                 <manvolnum>3</manvolnum></citerefentry> priority.
196                 </para>
198                 </listitem>
199                 </varlistentry>
201         </variablelist>
202 </refsect1>
204 <refsect1>
205         <title>EXAMPLES</title>
207         <para>Log file and directory open operations on the [records]
208         share using the LOCAL7 facility and ALERT priority, including
209         the username and IP address. Logging excludes the open VFS function
210         on failures:</para>
212 <programlisting>
213         <smbconfsection name="[records]"/>
214         <smbconfoption name="path">/data/records</smbconfoption>
215         <smbconfoption name="vfs objects">full_audit</smbconfoption>
216         <smbconfoption name="full_audit:prefix">%u|%I</smbconfoption>
217         <smbconfoption name="full_audit:success">open opendir</smbconfoption>
218         <smbconfoption name="full_audit:failure">all !open</smbconfoption>
219         <smbconfoption name="full_audit:facility">LOCAL7</smbconfoption>
220         <smbconfoption name="full_audit:priority">ALERT</smbconfoption>
221 </programlisting>
223 </refsect1>
225 <refsect1>
226         <title>VERSION</title>
227         <para>This man page is correct for version 3.0.25 of the Samba suite.
228         </para>
229 </refsect1>
231 <refsect1>
232         <title>AUTHOR</title>
234         <para>The original Samba software and related utilities
235         were created by Andrew Tridgell. Samba is now developed
236         by the Samba Team as an Open Source project similar
237         to the way the Linux kernel is developed.</para>
239 </refsect1>
241 </refentry>