libsmb: Make "ip_service_compare" static
[Samba.git] / docs-xml / manpages / vfs_full_audit.8.xml
blob7107fcb69ef8758e5809b75522b28af5a7ec1470
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.2</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_compression</member>
66         <member>get_nt_acl</member>
67         <member>get_quota</member>
68         <member>get_shadow_copy_data</member>
69         <member>getlock</member>
70         <member>getwd</member>
71         <member>getxattr</member>
72         <member>kernel_flock</member>
73         <member>link</member>
74         <member>linux_setlease</member>
75         <member>listxattr</member>
76         <member>lock</member>
77         <member>lseek</member>
78         <member>lstat</member>
79         <member>mkdir</member>
80         <member>mknod</member>
81         <member>open</member>
82         <member>opendir</member>
83         <member>pread</member>
84         <member>pwrite</member>
85         <member>read</member>
86         <member>readdir</member>
87         <member>readlink</member>
88         <member>realpath</member>
89         <member>removexattr</member>
90         <member>rename</member>
91         <member>rewinddir</member>
92         <member>rmdir</member>
93         <member>seekdir</member>
94         <member>sendfile</member>
95         <member>set_compression</member>
96         <member>set_nt_acl</member>
97         <member>set_quota</member>
98         <member>setxattr</member>
99         <member>stat</member>
100         <member>statvfs</member>
101         <member>symlink</member>
102         <member>sys_acl_delete_def_file</member>
103         <member>sys_acl_get_fd</member>
104         <member>sys_acl_get_file</member>
105         <member>sys_acl_set_fd</member>
106         <member>sys_acl_set_file</member>
107         <member>telldir</member>
108         <member>unlink</member>
109         <member>utime</member>
110         <member>write</member>
111         </simplelist>
113         <para>In addition to these operations,
114         <command>vfs_full_audit</command> recognizes the special operation
115         names &quot;all&quot; and &quot;none &quot;, which refer to all
116         the VFS operations and none of the VFS operations respectively.
117         </para>
119         <para><command>vfs_full_audit</command> records operations in fixed
120         format consisting of fields separated by '|' characters. The
121         format is: </para>
122         <programlisting>
123                 smbd_audit: PREFIX|OPERATION|RESULT|FILE
124         </programlisting>
126         <para>The record fields are:</para>
128         <itemizedlist>
129         <listitem><para><command>PREFIX</command> - the result of the full_audit:prefix string after variable substitutions</para></listitem>
130         <listitem><para><command>OPERATION</command> - the name of the VFS operation</para></listitem>
131         <listitem><para><command>RESULT</command> - whether the operation succeeded or failed</para></listitem>
132         <listitem><para><command>FILE</command> - the name of the file or directory the operation was performed on</para></listitem>
134         </itemizedlist>
136         <para>This module is stackable.</para>
138 </refsect1>
141 <refsect1>
142         <title>OPTIONS</title>
144         <variablelist>
146                 <varlistentry>
147                 <term>full_audit:prefix = STRING</term>
148                 <listitem>
149                 <para>Prepend audit messages with STRING. STRING is
150                 processed for standard substitution variables listed in
151                 <citerefentry><refentrytitle>smb.conf</refentrytitle>
152                 <manvolnum>5</manvolnum></citerefentry>. The default
153                 prefix is &quot;%u|%I&quot;. </para>
155                 </listitem>
156                 </varlistentry>
158                 <varlistentry>
159                 <term>full_audit:success = LIST</term>
160                 <listitem>
161                 <para>LIST is a list of VFS operations that should be
162                 recorded if they succeed. Operations are specified using
163                 the names listed above. Operations can be unset by prefixing
164                 the names with "!". The default is all operations.
165                 </para>
167                 </listitem>
168                 </varlistentry>
170                 <varlistentry>
171                 <term>full_audit:failure = LIST</term>
172                 <listitem>
173                 <para>LIST is a list of VFS operations that should be
174                 recorded if they failed. Operations are specified using
175                 the names listed above. Operations can be unset by prefixing
176                 the names with "!". The default is all operations.
177                 </para>
179                 </listitem>
180                 </varlistentry>
182                 <varlistentry>
183                 <term>full_audit:facility = FACILITY</term>
184                 <listitem>
185                 <para>Log messages to the named
186                 <citerefentry><refentrytitle>syslog</refentrytitle>
187                 <manvolnum>3</manvolnum></citerefentry> facility.
189                 </para>
191                 </listitem>
192                 </varlistentry>
194                 <varlistentry>
195                 <term>full_audit:priority = PRIORITY</term>
196                 <listitem>
197                 <para>Log messages with the named
198                 <citerefentry><refentrytitle>syslog</refentrytitle>
199                 <manvolnum>3</manvolnum></citerefentry> priority.
200                 </para>
202                 </listitem>
203                 </varlistentry>
205                 <varlistentry>
206                 <term>full_audit:syslog = true/false</term>
207                 <listitem>
208                 <para>Log messages to syslog (default) or as a debug level 1
209                 message.
210                 </para>
211                 </listitem>
212                 </varlistentry>
214                 <varlistentry>
215                 <term>full_audit:log_secdesc = true/false</term>
216                 <listitem>
217                 <para>Log an sddl form of the security descriptor coming in
218                 when a client sets an acl. Defaults to false.
219                 </para>
220                 </listitem>
221                 </varlistentry>
223         </variablelist>
224 </refsect1>
226 <refsect1>
227         <title>EXAMPLES</title>
229         <para>Log file and directory open operations on the [records]
230         share using the LOCAL7 facility and ALERT priority, including
231         the username and IP address. Logging excludes the open VFS function
232         on failures:</para>
234 <programlisting>
235         <smbconfsection name="[records]"/>
236         <smbconfoption name="path">/data/records</smbconfoption>
237         <smbconfoption name="vfs objects">full_audit</smbconfoption>
238         <smbconfoption name="full_audit:prefix">%u|%I</smbconfoption>
239         <smbconfoption name="full_audit:success">open opendir</smbconfoption>
240         <smbconfoption name="full_audit:failure">all !open</smbconfoption>
241         <smbconfoption name="full_audit:facility">LOCAL7</smbconfoption>
242         <smbconfoption name="full_audit:priority">ALERT</smbconfoption>
243 </programlisting>
245 </refsect1>
247 <refsect1>
248         <title>VERSION</title>
249         <para>This man page is correct for version 3.0.25 of the Samba suite.
250         </para>
251 </refsect1>
253 <refsect1>
254         <title>AUTHOR</title>
256         <para>The original Samba software and related utilities
257         were created by Andrew Tridgell. Samba is now developed
258         by the Samba Team as an Open Source project similar
259         to the way the Linux kernel is developed.</para>
261 </refsect1>
263 </refentry>