state->handle->conn,
src_fname_tmp,
dst_fname_tmp,
- OPENX_FILE_CREATE_IF_NOT_EXIST,
- 0, false);
+ OPENX_FILE_CREATE_IF_NOT_EXIST);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("%s: copy %s to %s failed: %s\n", __func__,
smb_fname_str_dbg(src_fname_tmp),
status = copy_file(mem_ctx, conn, smb_fname_old, smb_fname_new,
OPENX_FILE_EXISTS_TRUNCATE |
- OPENX_FILE_CREATE_IF_NOT_EXIST,
- 0, false);
+ OPENX_FILE_CREATE_IF_NOT_EXIST);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("move_driver_file_to_download_area: Unable "
connection_struct *conn,
struct smb_filename *smb_fname_src,
struct smb_filename *smb_fname_dst,
- int ofun,
- int count,
- bool target_is_directory);
+ int ofun);
uint64_t get_lock_offset(const uint8_t *data, int data_offset,
bool large_file_format);
connection_struct *conn,
struct smb_filename *smb_fname_src,
struct smb_filename *smb_fname_dst,
- int ofun,
- int count,
- bool target_is_directory)
+ int ofun)
{
struct smb_filename *smb_fname_dst_tmp = NULL;
off_t ret=-1;
return NT_STATUS_NO_MEMORY;
}
- /*
- * If the target is a directory, extract the last component from the
- * src filename and append it to the dst filename
- */
- if (target_is_directory) {
- const char *p;
-
- /* dest/target can't be a stream if it's a directory. */
- SMB_ASSERT(smb_fname_dst->stream_name == NULL);
-
- p = strrchr_m(smb_fname_src->base_name,'/');
- if (p) {
- p++;
- } else {
- p = smb_fname_src->base_name;
- }
- smb_fname_dst_tmp->base_name =
- talloc_asprintf_append(smb_fname_dst_tmp->base_name, "/%s",
- p);
- if (!smb_fname_dst_tmp->base_name) {
- status = NT_STATUS_NO_MEMORY;
- goto out;
- }
- }
-
status = vfs_file_exist(conn, smb_fname_src);
if (!NT_STATUS_IS_OK(status)) {
goto out;
goto out;
}
- if (!target_is_directory && count) {
- new_create_disposition = FILE_OPEN;
- } else {
- if (!map_open_params_to_ntcreate(smb_fname_dst_tmp->base_name,
- 0, ofun,
- NULL, NULL,
- &new_create_disposition,
- NULL,
- NULL)) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto out;
- }
+ if (!map_open_params_to_ntcreate(smb_fname_dst_tmp->base_name,
+ 0, ofun,
+ NULL, NULL,
+ &new_create_disposition,
+ NULL,
+ NULL)) {
+ status = NT_STATUS_INVALID_PARAMETER;
+ goto out;
}
/* Open the src file for reading. */