state->handle->conn,
src_fname_tmp,
dst_fname_tmp,
- OPENX_FILE_CREATE_IF_NOT_EXIST);
+ FILE_CREATE);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("%s: copy %s to %s failed: %s\n", __func__,
smb_fname_str_dbg(src_fname_tmp),
smb_fname_new->base_name));
status = copy_file(mem_ctx, conn, smb_fname_old, smb_fname_new,
- OPENX_FILE_EXISTS_TRUNCATE |
- OPENX_FILE_CREATE_IF_NOT_EXIST);
+ FILE_OVERWRITE_IF);
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);
+ uint32_t new_create_disposition);
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)
+ uint32_t new_create_disposition)
{
struct smb_filename *smb_fname_dst_tmp = NULL;
off_t ret=-1;
files_struct *fsp1,*fsp2;
uint32_t dosattrs;
- uint32_t new_create_disposition;
NTSTATUS status;
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. */
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
goto out;
}
- if (ofun & OPENX_FILE_EXISTS_OPEN) {
- ret = SMB_VFS_LSEEK(fsp2, 0, SEEK_END);
- if (ret == -1) {
- DEBUG(0, ("error - vfs lseek returned error %s\n",
- strerror(errno)));
- status = map_nt_error_from_unix(errno);
- close_file_free(NULL, &fsp1, ERROR_CLOSE);
- close_file_free(NULL, &fsp2, ERROR_CLOSE);
- goto out;
- }
- }
-
/* Do the actual copy. */
if (smb_fname_src->st.st_ex_size) {
ret = vfs_transfer_file(fsp1, fsp2, smb_fname_src->st.st_ex_size);