Merge tag 'upstream/4.0.5+dfsg1' into samba_4.0_ivo
[abartlet/samba-debian.git] / source3 / modules / vfs_extd_audit.c
index 34a43c712f880247f2a8720708c62c4119d5dc97..fc23ea91488b71367be372d7004494dd430d7cc5 100644 (file)
@@ -26,6 +26,7 @@
 #include "system/filesys.h"
 #include "system/syslog.h"
 #include "smbd/smbd.h"
+#include "lib/param/loadparm.h"
 
 static int vfs_extd_audit_debug_level = DBGC_VFS;
 
@@ -43,7 +44,8 @@ static int audit_syslog_facility(vfs_handle_struct *handle)
                { LOG_LOCAL4, "LOCAL4" },
                { LOG_LOCAL5, "LOCAL5" },
                { LOG_LOCAL6, "LOCAL6" },
-               { LOG_LOCAL7, "LOCAL7" }
+               { LOG_LOCAL7, "LOCAL7" },
+               { -1, NULL}
        };
 
        int facility;
@@ -64,7 +66,8 @@ static int audit_syslog_priority(vfs_handle_struct *handle)
                { LOG_WARNING, "WARNING" },
                { LOG_NOTICE, "NOTICE" },
                { LOG_INFO, "INFO" },
-               { LOG_DEBUG, "DEBUG" }
+               { LOG_DEBUG, "DEBUG" },
+               { -1, NULL}
        };
 
        int priority;
@@ -113,9 +116,9 @@ static void audit_disconnect(vfs_handle_struct *handle)
        return;
 }
 
-static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *audit_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
 {
-       SMB_STRUCT_DIR *result;
+       DIR *result;
 
        result = SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
 
@@ -343,18 +346,18 @@ static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t
 
 static struct vfs_fn_pointers vfs_extd_audit_fns = {
        .connect_fn = audit_connect,
-       .disconnect = audit_disconnect,
-       .opendir = audit_opendir,
-       .mkdir = audit_mkdir,
-       .rmdir = audit_rmdir,
+       .disconnect_fn = audit_disconnect,
+       .opendir_fn = audit_opendir,
+       .mkdir_fn = audit_mkdir,
+       .rmdir_fn = audit_rmdir,
        .open_fn = audit_open,
        .close_fn = audit_close,
-       .rename = audit_rename,
-       .unlink = audit_unlink,
-       .chmod = audit_chmod,
-       .fchmod = audit_fchmod,
-       .chmod_acl = audit_chmod_acl,
-       .fchmod_acl = audit_fchmod_acl,
+       .rename_fn = audit_rename,
+       .unlink_fn = audit_unlink,
+       .chmod_fn = audit_chmod,
+       .fchmod_fn = audit_fchmod,
+       .chmod_acl_fn = audit_chmod_acl,
+       .fchmod_acl_fn = audit_fchmod_acl,
 };
 
 NTSTATUS vfs_extd_audit_init(void)