samba-tool group: Add --special parameter to add predefined special group
[Samba.git] / docs-xml / manpages / vfs_full_audit.8.xml
blobfc08845ac3c3d936d9aeac9a4cd0069e4dd48a33
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">&doc.version;</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>aio_force</member>
42         <member>audit_file</member>
43         <member>brl_lock_windows</member>
44         <member>brl_unlock_windows</member>
45         <member>chdir</member>
46         <member>chflags</member>
47         <member>chmod</member>
48         <member>close</member>
49         <member>closedir</member>
50         <member>connect</member>
51         <member>connectpath</member>
52         <member>create_dfs_pathat</member>
53         <member>create_file</member>
54         <member>disconnect</member>
55         <member>disk_free</member>
56         <member>durable_cookie</member>
57         <member>durable_disconnect</member>
58         <member>durable_reconnect</member>
59         <member>fallocate</member>
60         <member>fchmod</member>
61         <member>fchown</member>
62         <member>fdopendir</member>
63         <member>fget_compression</member>
64         <member>fget_dos_attributes</member>
65         <member>fget_nt_acl_at</member>
66         <member>fgetxattr</member>
67         <member>file_id_create</member>
68         <member>flistxattr</member>
69         <member>fremovexattr</member>
70         <member>fs_capabilities</member>
71         <member>fsctl</member>
72         <member>fset_dos_attributes</member>
73         <member>fset_nt_acl</member>
74         <member>fsetxattr</member>
75         <member>fs_file_id</member>
76         <member>fstat</member>
77         <member>fsync</member>
78         <member>fsync_recv</member>
79         <member>fsync_send</member>
80         <member>ftruncate</member>
81         <member>get_alloc_size</member>
82         <member>get_dfs_referrals</member>
83         <member>get_dos_attributes</member>
84         <member>get_dos_attributes_recv</member>
85         <member>get_dos_attributes_send</member>
86         <member>getlock</member>
87         <member>get_nt_acl</member>
88         <member>get_quota</member>
89         <member>get_real_filename</member>
90         <member>get_shadow_copy_data</member>
91         <member>getwd</member>
92         <member>getxattr</member>
93         <member>getxattrat_recv</member>
94         <member>getxattrat_send</member>
95         <member>is_offline</member>
96         <member>filesystem_sharemode</member>
97         <member>lchown</member>
98         <member>linkat</member>
99         <member>linux_setlease</member>
100         <member>listxattr</member>
101         <member>lock</member>
102         <member>lseek</member>
103         <member>lstat</member>
104         <member>mkdirat</member>
105         <member>mknodat</member>
106         <member>ntimes</member>
107         <member>offload_read_recv</member>
108         <member>offload_read_send</member>
109         <member>offload_write_recv</member>
110         <member>offload_write_send</member>
111         <member>open</member>
112         <member>pread</member>
113         <member>pread_recv</member>
114         <member>pread_send</member>
115         <member>pwrite</member>
116         <member>pwrite_recv</member>
117         <member>pwrite_send</member>
118         <member>read</member>
119         <member>readdir</member>
120         <member>readdir_attr</member>
121         <member>readlinkat</member>
122         <member>realpath</member>
123         <member>recvfile</member>
124         <member>removexattr</member>
125         <member>renameat</member>
126         <member>rewinddir</member>
127         <member>seekdir</member>
128         <member>sendfile</member>
129         <member>set_compression</member>
130         <member>set_dos_attributes</member>
131         <member>set_offline</member>
132         <member>set_quota</member>
133         <member>setxattr</member>
134         <member>snap_check_path</member>
135         <member>snap_create</member>
136         <member>snap_delete</member>
137         <member>stat</member>
138         <member>statvfs</member>
139         <member>streaminfo</member>
140         <member>strict_lock_check</member>
141         <member>symlinkat</member>
142         <member>sys_acl_blob_get_fd</member>
143         <member>sys_acl_blob_get_file</member>
144         <member>sys_acl_get_fd</member>
145         <member>sys_acl_get_file</member>
146         <member>sys_acl_set_fd</member>
147         <member>telldir</member>
148         <member>translate_name</member>
149         <member>unlinkat</member>
150         <member>write</member>
151         </simplelist>
153         <para>In addition to these operations,
154         <command>vfs_full_audit</command> recognizes the special operation
155         names &quot;all&quot; and &quot;none &quot;, which refer to all
156         the VFS operations and none of the VFS operations respectively.
157         </para>
159         <para><command>vfs_full_audit</command> records operations in fixed
160         format consisting of fields separated by '|' characters. The
161         format is: </para>
162         <programlisting>
163                 smbd_audit: PREFIX|OPERATION|RESULT|FILE
164         </programlisting>
166         <para>The record fields are:</para>
168         <itemizedlist>
169         <listitem><para><command>PREFIX</command> - the result of the full_audit:prefix string after variable substitutions</para></listitem>
170         <listitem><para><command>OPERATION</command> - the name of the VFS operation</para></listitem>
171         <listitem><para><command>RESULT</command> - whether the operation succeeded or failed</para></listitem>
172         <listitem><para><command>FILE</command> - the name of the file or directory the operation was performed on</para></listitem>
174         </itemizedlist>
176         <para>This module is stackable.</para>
178 </refsect1>
181 <refsect1>
182         <title>OPTIONS</title>
184         <variablelist>
186                 <varlistentry>
187                 <term>full_audit:prefix = STRING</term>
188                 <listitem>
189                 <para>Prepend audit messages with STRING. STRING is
190                 processed for standard substitution variables listed in
191                 <citerefentry><refentrytitle>smb.conf</refentrytitle>
192                 <manvolnum>5</manvolnum></citerefentry>. The default
193                 prefix is &quot;%u|%I&quot;. </para>
195                 </listitem>
196                 </varlistentry>
198                 <varlistentry>
199                 <term>full_audit:success = LIST</term>
200                 <listitem>
201                 <para>LIST is a list of VFS operations that should be
202                 recorded if they succeed. Operations are specified using
203                 the names listed above. Operations can be unset by prefixing
204                 the names with "!". The default is none operations.
205                 </para>
207                 </listitem>
208                 </varlistentry>
210                 <varlistentry>
211                 <term>full_audit:failure = LIST</term>
212                 <listitem>
213                 <para>LIST is a list of VFS operations that should be
214                 recorded if they failed. Operations are specified using
215                 the names listed above. Operations can be unset by prefixing
216                 the names with "!". The default is none operations.
217                 </para>
219                 </listitem>
220                 </varlistentry>
222                 <varlistentry>
223                 <term>full_audit:facility = FACILITY</term>
224                 <listitem>
225                 <para>Log messages to the named
226                 <citerefentry><refentrytitle>syslog</refentrytitle>
227                 <manvolnum>3</manvolnum></citerefentry> facility.
229                 </para>
231                 </listitem>
232                 </varlistentry>
234                 <varlistentry>
235                 <term>full_audit:priority = PRIORITY</term>
236                 <listitem>
237                 <para>Log messages with the named
238                 <citerefentry><refentrytitle>syslog</refentrytitle>
239                 <manvolnum>3</manvolnum></citerefentry> priority.
240                 </para>
242                 </listitem>
243                 </varlistentry>
245                 <varlistentry>
246                 <term>full_audit:syslog = true/false</term>
247                 <listitem>
248                 <para>Log messages to syslog (default) or as a debug level 1
249                 message.
250                 </para>
251                 </listitem>
252                 </varlistentry>
254                 <varlistentry>
255                 <term>full_audit:log_secdesc = true/false</term>
256                 <listitem>
257                 <para>Log an sddl form of the security descriptor coming in
258                 when a client sets an acl. Defaults to false.
259                 </para>
260                 </listitem>
261                 </varlistentry>
263         </variablelist>
264 </refsect1>
266 <refsect1>
267         <title>EXAMPLES</title>
269         <para>Log file and directory open operations on the [records]
270         share using the LOCAL7 facility and ALERT priority, including
271         the username and IP address. Logging excludes the open VFS function
272         on failures:</para>
274 <programlisting>
275         <smbconfsection name="[records]"/>
276         <smbconfoption name="path">/data/records</smbconfoption>
277         <smbconfoption name="vfs objects">full_audit</smbconfoption>
278         <smbconfoption name="full_audit:prefix">%u|%I</smbconfoption>
279         <smbconfoption name="full_audit:success">open opendir</smbconfoption>
280         <smbconfoption name="full_audit:failure">all !open</smbconfoption>
281         <smbconfoption name="full_audit:facility">LOCAL7</smbconfoption>
282         <smbconfoption name="full_audit:priority">ALERT</smbconfoption>
283 </programlisting>
285 </refsect1>
287 <refsect1>
288         <title>VERSION</title>
289         <para>This man page is part of version &doc.version; of the Samba suite.
290         </para>
291 </refsect1>
293 <refsect1>
294         <title>AUTHOR</title>
296         <para>The original Samba software and related utilities
297         were created by Andrew Tridgell. Samba is now developed
298         by the Samba Team as an Open Source project similar
299         to the way the Linux kernel is developed.</para>
301 </refsect1>
303 </refentry>