/**
* Return a string using the do_log_ctx()
*/
-static const char *smb_fname_str_do_log(const struct smb_filename *cwd,
+static const char *smb_fname_str_do_log(struct connection_struct *conn,
const struct smb_filename *smb_fname)
{
char *fname = NULL;
if (!ISDOT(smb_fname->base_name)) {
abs_name = talloc_asprintf(do_log_ctx(),
"%s/%s",
- cwd->base_name,
+ conn->cwd_fname->base_name,
smb_fname->base_name);
} else {
abs_name = talloc_strdup(do_log_ctx(),
- cwd->base_name);
+ conn->cwd_fname->base_name);
}
if (abs_name == NULL) {
return "";
*/
static const char *fsp_str_do_log(const struct files_struct *fsp)
{
- return smb_fname_str_do_log(fsp->conn->cwd_fname, fsp->fsp_name);
+ return smb_fname_str_do_log(fsp->conn, 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(handle->conn->cwd_fname, smb_fname));
+ smb_fname_str_do_log(handle->conn, smb_fname));
return result;
}
"0x%x|%s|%s|%s", access_mask,
create_options & FILE_DIRECTORY_FILE ? "dir" : "file",
str_create_disposition,
- smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
+ smb_fname_str_do_log(handle->conn, 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(handle->conn->cwd_fname, smb_fname_src),
- smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname_dst));
+ smb_fname_str_do_log(handle->conn, smb_fname_src),
+ smb_fname_str_do_log(handle->conn, 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(handle->conn->cwd_fname, smb_fname));
+ smb_fname_str_do_log(handle->conn, 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(handle->conn->cwd_fname, smb_fname));
+ smb_fname_str_do_log(handle->conn, 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(handle->conn->cwd_fname, smb_fname));
+ smb_fname_str_do_log(handle->conn, smb_fname));
return result;
}
(result >= 0),
handle,
"%s|%s|%s|%s|%s",
- smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname),
+ smb_fname_str_do_log(handle->conn, smb_fname),
create_time_str,
atime_str,
mtime_str,
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(handle->conn->cwd_fname, smb_fname)));
+ smb_fname_str_do_log(handle->conn, 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(handle->conn->cwd_fname, fname));
+ smb_fname_str_do_log(handle->conn, fname));
return status;
}
NT_STATUS_IS_OK(status),
handle,
"%s",
- smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
+ smb_fname_str_do_log(handle->conn, smb_fname));
return status;
}
NT_STATUS_IS_OK(status),
handle,
"%s",
- smb_fname_str_do_log(handle->conn->cwd_fname, smb_fname));
+ smb_fname_str_do_log(handle->conn, 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(handle->conn->cwd_fname, smb_fname));
+ "%s", smb_fname_str_do_log(handle->conn, smb_fname));
return result;
}
do_log(SMB_VFS_OP_AUDIT_FILE, NT_STATUS_IS_OK(result), handle,
"%s",
- smb_fname_str_do_log(handle->conn->cwd_fname, file));
+ smb_fname_str_do_log(handle->conn, file));
return result;
}