/**
* Return a string using the do_log_ctx()
*/
-static const char *smb_fname_str_do_log(const struct smb_filename *smb_fname)
+static const char *smb_fname_str_do_log(const struct smb_filename *cwd,
+ const struct smb_filename *smb_fname)
{
char *fname = NULL;
NTSTATUS status;
*/
static const char *fsp_str_do_log(const struct files_struct *fsp)
{
- return smb_fname_str_do_log(fsp->fsp_name);
+ return smb_fname_str_do_log(fsp->conn->cwd_fname, fsp->fsp_name);
}
/* Implementation of vfs_ops. Pass everything on to the default
do_log(SMB_VFS_OP_OPEN, (result >= 0), handle, "%s|%s",
((flags & O_WRONLY) || (flags & O_RDWR))?"w":"r",
- smb_fname_str_do_log(smb_fname));
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
return result;
}
do_log(SMB_VFS_OP_CREATE_FILE, (NT_STATUS_IS_OK(result)), handle,
"0x%x|%s|%s|%s", access_mask,
create_options & FILE_DIRECTORY_FILE ? "dir" : "file",
- str_create_disposition, smb_fname_str_do_log(smb_fname));
+ str_create_disposition,
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
return result;
}
result = SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
do_log(SMB_VFS_OP_RENAME, (result >= 0), handle, "%s|%s",
- smb_fname_str_do_log(smb_fname_src),
- smb_fname_str_do_log(smb_fname_dst));
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname_src),
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname_dst));
return result;
}
result = SMB_VFS_NEXT_STAT(handle, smb_fname);
do_log(SMB_VFS_OP_STAT, (result >= 0), handle, "%s",
- smb_fname_str_do_log(smb_fname));
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
return result;
}
result = SMB_VFS_NEXT_LSTAT(handle, smb_fname);
do_log(SMB_VFS_OP_LSTAT, (result >= 0), handle, "%s",
- smb_fname_str_do_log(smb_fname));
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
return result;
}
result = SMB_VFS_NEXT_UNLINK(handle, smb_fname);
do_log(SMB_VFS_OP_UNLINK, (result >= 0), handle, "%s",
- smb_fname_str_do_log(smb_fname));
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
return result;
}
result = SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft);
do_log(SMB_VFS_OP_NTIMES, (result >= 0), handle, "%s",
- smb_fname_str_do_log(smb_fname));
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
return result;
}
do_log(SMB_VFS_OP_GET_COMPRESSION, NT_STATUS_IS_OK(result), handle,
"%s",
- (fsp ? fsp_str_do_log(fsp) : smb_fname_str_do_log(smb_fname)));
+ (fsp ? fsp_str_do_log(fsp) :
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname)));
return result;
}
status = SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
do_log(SMB_VFS_OP_READDIR_ATTR, NT_STATUS_IS_OK(status), handle, "%s",
- smb_fname_str_do_log(fname));
+ smb_fname_str_do_log(handle->conn->cwd_fname, fname));
return status;
}
NT_STATUS_IS_OK(status),
handle,
"%s",
- smb_fname_str_do_log(smb_fname));
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
return status;
}
NT_STATUS_IS_OK(status),
handle,
"%s",
- smb_fname_str_do_log(smb_fname));
+ smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
return status;
}
mem_ctx, ppdesc);
do_log(SMB_VFS_OP_GET_NT_ACL, NT_STATUS_IS_OK(result), handle,
- "%s", smb_fname_str_do_log(smb_fname));
+ "%s", smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
return result;
}
access_denied);
do_log(SMB_VFS_OP_AUDIT_FILE, NT_STATUS_IS_OK(result), handle,
- "%s", smb_fname_str_do_log(file));
+ "%s",
+ smb_fname_str_do_log(handle->conn->cwd_fname, file));
return result;
}