s3: Change SMB_VFS_OPEN to take an smb_filename struct
[sfrench/samba-autobuild/.git] / source3 / modules / vfs_extd_audit.c
index b59a780f52ebf0225443610381069cadd8265450..763f1545d75b5500e8b668efb31ef012d4f1a9fb 100644 (file)
@@ -36,7 +36,7 @@ static void audit_disconnect(vfs_handle_struct *handle);
 static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr);
 static int audit_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode);
 static int audit_rmdir(vfs_handle_struct *handle, const char *path);
-static int audit_open(vfs_handle_struct *handle, const char *fname, files_struct *fsp, int flags, mode_t mode);
+static int audit_open(vfs_handle_struct *handle, struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode);
 static int audit_close(vfs_handle_struct *handle, files_struct *fsp);
 static int audit_rename(vfs_handle_struct *handle, const char *oldname, const char *newname);
 static int audit_unlink(vfs_handle_struct *handle, const char *path);
@@ -216,21 +216,23 @@ static int audit_rmdir(vfs_handle_struct *handle, const char *path)
        return result;
 }
 
-static int audit_open(vfs_handle_struct *handle, const char *fname, files_struct *fsp, int flags, mode_t mode)
+static int audit_open(vfs_handle_struct *handle,
+                     struct smb_filename *smb_fname, files_struct *fsp,
+                     int flags, mode_t mode)
 {
        int result;
 
-       result = SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode);
+       result = SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
 
        if (lp_syslog() > 0) {
                syslog(audit_syslog_priority(handle), "open %s (fd %d) %s%s%s\n",
-                      fname, result,
+                      smb_fname_str_dbg(smb_fname), result,
                       ((flags & O_WRONLY) || (flags & O_RDWR)) ? "for writing " : "",
                       (result < 0) ? "failed: " : "",
                       (result < 0) ? strerror(errno) : "");
        }
        DEBUG(2, ("vfs_extd_audit: open %s %s %s\n",
-              fname,
+              smb_fname_str_dbg(smb_fname),
               (result < 0) ? "failed: " : "",
               (result < 0) ? strerror(errno) : ""));