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">
6 <refentrytitle>vfs_full_audit</refentrytitle>
7 <manvolnum>8</manvolnum>
12 <refname>vfs_full_audit</refname>
13 <refpurpose>record Samba VFS operations in the system log</refpurpose>
18 <command>vfs objects = full_audit</command>
23 <title>DESCRIPTION</title>
25 <para>This VFS module is part of the
26 <citerefentry><refentrytitle>samba</refentrytitle>
27 <manvolnum>7</manvolnum></citerefentry> suite.</para>
29 <para>The <command>vfs_full_audit</command> VFS module records selected
30 client operations to the system log using
31 <citerefentry><refentrytitle>syslog</refentrytitle>
32 <manvolnum>3</manvolnum></citerefentry>.</para>
34 <para><command>vfs_full_audit</command> is able to record the
35 complete set of Samba VFS operations:</para>
38 <member>aio_cancel</member>
39 <member>aio_error</member>
40 <member>aio_fsync</member>
41 <member>aio_read</member>
42 <member>aio_return</member>
43 <member>aio_suspend</member>
44 <member>aio_write</member>
45 <member>chdir</member>
46 <member>chflags</member>
47 <member>chmod</member>
48 <member>chmod_acl</member>
49 <member>chown</member>
50 <member>close</member>
51 <member>closedir</member>
52 <member>connect</member>
53 <member>disconnect</member>
54 <member>disk_free</member>
55 <member>fchmod</member>
56 <member>fchmod_acl</member>
57 <member>fchown</member>
58 <member>fget_nt_acl</member>
59 <member>fgetxattr</member>
60 <member>flistxattr</member>
61 <member>fremovexattr</member>
62 <member>fset_nt_acl</member>
63 <member>fsetxattr</member>
64 <member>fstat</member>
65 <member>fsync</member>
66 <member>ftruncate</member>
67 <member>get_nt_acl</member>
68 <member>get_quota</member>
69 <member>get_shadow_copy_data</member>
70 <member>getlock</member>
71 <member>getwd</member>
72 <member>getxattr</member>
73 <member>kernel_flock</member>
74 <member>lgetxattr</member>
76 <member>linux_setlease</member>
77 <member>listxattr</member>
78 <member>llistxattr</member>
80 <member>lremovexattr</member>
81 <member>lseek</member>
82 <member>lsetxattr</member>
83 <member>lstat</member>
84 <member>mkdir</member>
85 <member>mknod</member>
87 <member>opendir</member>
88 <member>pread</member>
89 <member>pwrite</member>
91 <member>readdir</member>
92 <member>readlink</member>
93 <member>realpath</member>
94 <member>removexattr</member>
95 <member>rename</member>
96 <member>rewinddir</member>
97 <member>rmdir</member>
98 <member>seekdir</member>
99 <member>sendfile</member>
100 <member>set_nt_acl</member>
101 <member>set_quota</member>
102 <member>setxattr</member>
103 <member>stat</member>
104 <member>statvfs</member>
105 <member>symlink</member>
106 <member>sys_acl_add_perm</member>
107 <member>sys_acl_clear_perms</member>
108 <member>sys_acl_create_entry</member>
109 <member>sys_acl_delete_def_file</member>
110 <member>sys_acl_free_acl</member>
111 <member>sys_acl_free_qualifier</member>
112 <member>sys_acl_free_text</member>
113 <member>sys_acl_get_entry</member>
114 <member>sys_acl_get_fd</member>
115 <member>sys_acl_get_file</member>
116 <member>sys_acl_get_perm</member>
117 <member>sys_acl_get_permset</member>
118 <member>sys_acl_get_qualifier</member>
119 <member>sys_acl_get_tag_type</member>
120 <member>sys_acl_init</member>
121 <member>sys_acl_set_fd</member>
122 <member>sys_acl_set_file</member>
123 <member>sys_acl_set_permset</member>
124 <member>sys_acl_set_qualifier</member>
125 <member>sys_acl_set_tag_type</member>
126 <member>sys_acl_to_text</member>
127 <member>sys_acl_valid</member>
128 <member>telldir</member>
129 <member>unlink</member>
130 <member>utime</member>
131 <member>write</member>
134 <para>In addition to these operations,
135 <command>vfs_full_audit</command> recognizes the special operation
136 names "all" and "none ", which refer to all
137 the VFS operations and none of the VFS operations respectively.
140 <para><command>vfs_full_audit</command> records operations in fixed
141 format consisting of fields separated by '|' characters. The
144 smbd_audit: PREFIX|OPERATION|RESULT|FILE
147 <para>The record fields are:</para>
150 <listitem><para><command>PREFIX</command> - the result of the full_audit:prefix string after variable substitutions</para></listitem>
151 <listitem><para><command>OPERATION</command> - the name of the VFS operation</para></listitem>
152 <listitem><para><command>RESULT</command> - whether the operation succeeded or failed</para></listitem>
153 <listitem><para><command>FILE</command> - the name of the file or directory the operation was performed on</para></listitem>
157 <para>This module is stackable.</para>
163 <title>OPTIONS</title>
168 <term>vfs_full_audit:prefix = STRING</term>
170 <para>Prepend audit messages with STRING. STRING is
171 processed for standard substitution variables listed in
172 <citerefentry><refentrytitle>smb.conf</refentrytitle>
173 <manvolnum>5</manvolnum></citerefentry>. The default
174 prefix is "%u|%I". </para>
180 <term>vfs_full_audit:success = LIST</term>
182 <para>LIST is a list of VFS operations that should be
183 recorded if they succeed. Operations are specified using
184 the names listed above.
191 <term>vfs_full_audit:failure = LIST</term>
193 <para>LIST is a list of VFS operations that should be
194 recorded if they failed. Operations are specified using
195 the names listed above.
202 <term>full_audit:facility = FACILITY</term>
204 <para>Log messages to the named
205 <citerefentry><refentrytitle>syslog</refentrytitle>
206 <manvolnum>3</manvolnum></citerefentry> facility.
214 <term>full_audit:priority = PRIORITY</term>
216 <para>Log messages with the named
217 <citerefentry><refentrytitle>syslog</refentrytitle>
218 <manvolnum>3</manvolnum></citerefentry> priority.
228 <title>EXAMPLES</title>
230 <para>Log file and directory open operations on the [records]
231 share using the LOCAL7 facility and ALERT priority, including
232 the username and IP address:</para>
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</smbconfoption>
241 <smbconfoption name="full_audit:facility">LOCAL7</smbconfoption>
242 <smbconfoption name="full_audit:priority">ALERT</smbconfoption>
248 <title>VERSION</title>
249 <para>This man page is correct for version 3.0.25 of the Samba suite.
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>