req->flags2 & FLAGS2_DFS_PATHNAMES,
fname,
&smb_fname,
- &fname);
+ NULL);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req,
goto out;
}
- if (!map_open_params_to_ntcreate(fname, deny_mode, open_ofun,
+ if (!map_open_params_to_ntcreate(smb_fname->base_name, deny_mode,
+ open_ofun,
&access_mask,
&share_mode,
&create_disposition,
}
size = get_file_size_stat(&smb_fname->st);
- fattr = dos_mode(conn, fsp->fsp_name, &smb_fname->st);
+ fattr = dos_mode(conn, smb_fname);
mtime = convert_timespec_to_time_t(smb_fname->st.st_ex_mtime);
inode = smb_fname->st.st_ex_ino;
if (fattr & aDIR) {
if (got_match) {
bool isdots = (ISDOT(dname) || ISDOTDOT(dname));
+ struct smb_filename *smb_fname = NULL;
+ NTSTATUS status;
if (dont_descend && !isdots) {
TALLOC_FREE(fname);
return False;
}
+ /* A dirent from dptr_ReadDirName isn't a stream. */
+ status = create_synthetic_smb_fname(ctx, pathreal,
+ NULL, &sbuf,
+ &smb_fname);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(fname);
+ return false;
+ }
+
if (INFO_LEVEL_IS_UNIX(info_level)) {
- if (vfs_lstat_smb_fname(conn, pathreal,
- &sbuf) != 0) {
- DEBUG(5,("get_lanman2_dir_entry:Couldn't lstat [%s] (%s)\n",
- pathreal,strerror(errno)));
+ if (SMB_VFS_LSTAT(conn, smb_fname) != 0) {
+ DEBUG(5,("get_lanman2_dir_entry: "
+ "Couldn't lstat [%s] (%s)\n",
+ smb_fname_str_dbg(smb_fname),
+ strerror(errno)));
+ TALLOC_FREE(smb_fname);
TALLOC_FREE(pathreal);
TALLOC_FREE(fname);
continue;
}
- } else if (!VALID_STAT(sbuf) &&
- vfs_stat_smb_fname(conn, pathreal,
- &sbuf) != 0) {
+ } else if (!VALID_STAT(smb_fname->st) &&
+ SMB_VFS_STAT(conn, smb_fname) != 0) {
/* Needed to show the msdfs symlinks as
* directories */
- ms_dfs_link = check_msdfs_link(conn, pathreal, &sbuf);
+ ms_dfs_link =
+ check_msdfs_link(conn,
+ smb_fname->base_name,
+ &smb_fname->st);
if (!ms_dfs_link) {
- DEBUG(5,("get_lanman2_dir_entry:Couldn't stat [%s] (%s)\n",
- pathreal,strerror(errno)));
+ DEBUG(5,("get_lanman2_dir_entry: "
+ "Couldn't stat [%s] (%s)\n",
+ smb_fname_str_dbg(smb_fname),
+ strerror(errno)));
+ TALLOC_FREE(smb_fname);
TALLOC_FREE(pathreal);
TALLOC_FREE(fname);
continue;
}
if (ms_dfs_link) {
- mode = dos_mode_msdfs(conn,pathreal,&sbuf);
+ mode = dos_mode_msdfs(conn, smb_fname);
} else {
- mode = dos_mode(conn,pathreal,&sbuf);
+ mode = dos_mode(conn, smb_fname);
}
if (!dir_check_ftype(conn,mode,dirtype)) {
DEBUG(5,("get_lanman2_dir_entry: [%s] attribs didn't match %x\n",fname,dirtype));
+ TALLOC_FREE(smb_fname);
TALLOC_FREE(pathreal);
TALLOC_FREE(fname);
continue;
}
if (!(mode & aDIR)) {
- file_size = get_file_size_stat(&sbuf);
+ file_size = get_file_size_stat(&smb_fname->st);
}
- allocation_size = SMB_VFS_GET_ALLOC_SIZE(conn,NULL,&sbuf);
-
- mdate_ts = sbuf.st_ex_mtime;
- adate_ts = sbuf.st_ex_atime;
- create_date_ts = sbuf.st_ex_btime;
+ allocation_size =
+ SMB_VFS_GET_ALLOC_SIZE(conn, NULL, &smb_fname->st);
if (ask_sharemode) {
struct timespec write_time_ts;
struct file_id fileid;
- fileid = vfs_file_id_from_sbuf(conn, &sbuf);
+ ZERO_STRUCT(write_time_ts);
+ fileid = vfs_file_id_from_sbuf(conn,
+ &smb_fname->st);
get_file_infos(fileid, NULL, &write_time_ts);
if (!null_timespec(write_time_ts)) {
- mdate_ts = write_time_ts;
+ update_stat_ex_mtime(&smb_fname->st,
+ write_time_ts);
}
}
+ mdate_ts = smb_fname->st.st_ex_mtime;
+ adate_ts = smb_fname->st.st_ex_atime;
+ create_date_ts = smb_fname->st.st_ex_btime;
+
if (lp_dos_filetime_resolution(SNUM(conn))) {
dos_filetime_timespec(&create_date_ts);
dos_filetime_timespec(&mdate_ts);
adate = convert_timespec_to_time_t(adate_ts);
DEBUG(5,("get_lanman2_dir_entry: found %s fname=%s\n",
- pathreal,fname));
+ smb_fname_str_dbg(smb_fname), fname));
found = True;
dptr_DirCacheAdd(conn->dirptr, dname, curr_dirpos);
+ sbuf = smb_fname->st;
+
+ TALLOC_FREE(smb_fname);
}
if (!found)
uint64_t dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
data_len = 18;
if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (uint64_t)-1) {
- reply_unixerror(req, ERRHRD, ERRgeneral);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
uint64_t dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
data_len = 24;
if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (uint64_t)-1) {
- reply_unixerror(req, ERRHRD, ERRgeneral);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
block_size = lp_block_size(snum);
uint64_t dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
data_len = 32;
if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (uint64_t)-1) {
- reply_unixerror(req, ERRHRD, ERRgeneral);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
block_size = lp_block_size(snum);
"(%s)\n",
smb_fname_str_dbg(smb_fname),
strerror(errno)));
- reply_unixerror(req,ERRDOS,ERRbadpath);
+ reply_nterror(req,map_nt_error_from_unix(errno));
return;
}
} else if (SMB_VFS_STAT(conn, smb_fname)) {
"SMB_VFS_STAT of %s failed (%s)\n",
smb_fname_str_dbg(smb_fname),
strerror(errno)));
- reply_unixerror(req, ERRDOS, ERRbadpath);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
if (SMB_VFS_FSTAT(fsp, &smb_fname->st) != 0) {
DEBUG(3, ("fstat of fnum %d failed (%s)\n",
fsp->fnum, strerror(errno)));
- reply_unixerror(req, ERRDOS, ERRbadfid);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
pos = fsp->fh->position_information;
"(%s)\n",
smb_fname_str_dbg(smb_fname_base),
strerror(errno)));
+ reply_nterror(req,map_nt_error_from_unix(errno));
TALLOC_FREE(smb_fname_base);
- reply_unixerror(req,ERRDOS,ERRbadpath);
return;
}
} else {
"(%s)\n",
smb_fname_str_dbg(smb_fname_base),
strerror(errno)));
+ reply_nterror(req,map_nt_error_from_unix(errno));
TALLOC_FREE(smb_fname_base);
- reply_unixerror(req,ERRDOS,ERRbadpath);
return;
}
}
"SMB_VFS_LSTAT of %s failed (%s)\n",
smb_fname_str_dbg(smb_fname),
strerror(errno)));
- reply_unixerror(req, ERRDOS, ERRbadpath);
+ reply_nterror(req,map_nt_error_from_unix(errno));
return;
}
"SMB_VFS_STAT of %s failed (%s)\n",
smb_fname_str_dbg(smb_fname),
strerror(errno)));
- reply_unixerror(req, ERRDOS, ERRbadpath);
+ reply_nterror(req,map_nt_error_from_unix(errno));
return;
}
}
DEBUG(3,("call_trans2qfilepathinfo %s (fnum = %d) level=%d call=%d total_data=%d\n",
fname,fsp ? fsp->fnum : -1, info_level,tran_call,total_data));
- p = strrchr_m(fname,'/');
+ p = strrchr_m(smb_fname->base_name,'/');
if (!p)
- base_name = fname;
+ base_name = smb_fname->base_name;
else
base_name = p+1;
if (ms_dfs_link) {
- mode = dos_mode_msdfs(conn,fname,&sbuf);
+ mode = dos_mode_msdfs(conn, smb_fname);
} else {
- mode = dos_mode(conn,fname,&sbuf);
+ mode = dos_mode(conn, smb_fname);
}
if (!mode)
mode = FILE_ATTRIBUTE_NORMAL;
dstart = pdata;
dend = dstart + data_size - 1;
- create_time_ts = sbuf.st_ex_btime;
- mtime_ts = sbuf.st_ex_mtime;
- atime_ts = sbuf.st_ex_atime;
-
allocation_size = SMB_VFS_GET_ALLOC_SIZE(conn,fsp,&sbuf);
if (!fsp) {
}
if (!null_timespec(write_time_ts) && !INFO_LEVEL_IS_UNIX(info_level)) {
- mtime_ts = write_time_ts;
+ update_stat_ex_mtime(&sbuf, write_time_ts);
}
+ create_time_ts = sbuf.st_ex_btime;
+ mtime_ts = sbuf.st_ex_mtime;
+ atime_ts = sbuf.st_ex_atime;
+
if (lp_dos_filetime_resolution(SNUM(conn))) {
dos_filetime_timespec(&create_time_ts);
dos_filetime_timespec(&mtime_ts);
DEBUG(10,("call_trans2qfilepathinfo: SMB_QUERY_FILE_UNIX_LINK\n"));
#ifdef S_ISLNK
if(!S_ISLNK(sbuf.st_ex_mode)) {
- reply_unixerror(req, ERRSRV,
+ reply_doserror(req, ERRSRV,
ERRbadlink);
return;
}
#else
- reply_unixerror(req, ERRDOS, ERRbadlink);
+ reply_doserror(req, ERRDOS, ERRbadlink);
return;
#endif
len = SMB_VFS_READLINK(conn,fullpathname,
buffer, PATH_MAX);
if (len == -1) {
- reply_unixerror(req, ERRDOS,
- ERRnoaccess);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
buffer[len] = 0;
NTSTATUS smb_set_file_time(connection_struct *conn,
files_struct *fsp,
- const char *fname,
- const SMB_STRUCT_STAT *psbuf,
+ const struct smb_filename *smb_fname,
struct smb_file_time *ft,
bool setting_write_time)
{
+ struct smb_filename *smb_fname_base = NULL;
uint32 action =
FILE_NOTIFY_CHANGE_LAST_ACCESS
|FILE_NOTIFY_CHANGE_LAST_WRITE;
+ NTSTATUS status;
- if (!VALID_STAT(*psbuf)) {
+ if (!VALID_STAT(smb_fname->st)) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
/* get some defaults (no modifications) if any info is zero or -1. */
if (null_timespec(ft->atime)) {
- ft->atime= psbuf->st_ex_atime;
+ ft->atime= smb_fname->st.st_ex_atime;
action &= ~FILE_NOTIFY_CHANGE_LAST_ACCESS;
}
if (null_timespec(ft->mtime)) {
- ft->mtime = psbuf->st_ex_mtime;
+ ft->mtime = smb_fname->st.st_ex_mtime;
action &= ~FILE_NOTIFY_CHANGE_LAST_WRITE;
}
*/
{
- struct timespec mts = psbuf->st_ex_mtime;
- struct timespec ats = psbuf->st_ex_atime;
+ struct timespec mts = smb_fname->st.st_ex_mtime;
+ struct timespec ats = smb_fname->st.st_ex_atime;
if ((timespec_compare(&ft->atime, &ats) == 0) &&
(timespec_compare(&ft->mtime, &mts) == 0)) {
return NT_STATUS_OK;
set_sticky_write_time_fsp(fsp, ft->mtime);
}
} else {
- set_sticky_write_time_path(conn, fname,
- vfs_file_id_from_sbuf(conn, psbuf),
- ft->mtime);
+ set_sticky_write_time_path(
+ vfs_file_id_from_sbuf(conn, &smb_fname->st),
+ ft->mtime);
}
}
DEBUG(10,("smb_set_file_time: setting utimes to modified values.\n"));
- if (fsp && fsp->base_fsp) {
- fname = fsp->base_fsp->fsp_name;
+ /* Always call ntimes on the base, even if a stream was passed in. */
+ status = create_synthetic_smb_fname(talloc_tos(), smb_fname->base_name,
+ NULL, &smb_fname->st,
+ &smb_fname_base);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
- if(file_ntimes(conn, fname, ft, psbuf)!=0) {
+ if(file_ntimes(conn, smb_fname_base, ft)!=0) {
+ TALLOC_FREE(smb_fname_base);
return map_nt_error_from_unix(errno);
}
- notify_fname(conn, NOTIFY_ACTION_MODIFIED, action, fname);
+ TALLOC_FREE(smb_fname_base);
+ notify_fname(conn, NOTIFY_ACTION_MODIFIED, action,
+ smb_fname->base_name);
return NT_STATUS_OK;
}
****************************************************************************/
static NTSTATUS smb_set_file_dosmode(connection_struct *conn,
- files_struct *fsp,
- const char *fname,
- SMB_STRUCT_STAT *psbuf,
- uint32 dosmode)
+ const struct smb_filename *smb_fname,
+ uint32 dosmode)
{
- if (!VALID_STAT(*psbuf)) {
+ struct smb_filename *smb_fname_base = NULL;
+ NTSTATUS status;
+
+ if (!VALID_STAT(smb_fname->st)) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
- if (fsp) {
- if (fsp->base_fsp) {
- fname = fsp->base_fsp->fsp_name;
- } else {
- fname = fsp->fsp_name;
- }
+ /* Always operate on the base_name, even if a stream was passed in. */
+ status = create_synthetic_smb_fname(talloc_tos(), smb_fname->base_name,
+ NULL, &smb_fname->st,
+ &smb_fname_base);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
if (dosmode) {
- if (S_ISDIR(psbuf->st_ex_mode)) {
+ if (S_ISDIR(smb_fname_base->st.st_ex_mode)) {
dosmode |= aDIR;
} else {
dosmode &= ~aDIR;
DEBUG(6,("smb_set_file_dosmode: dosmode: 0x%x\n", (unsigned int)dosmode));
/* check the mode isn't different, before changing it */
- if ((dosmode != 0) && (dosmode != dos_mode(conn, fname, psbuf))) {
- struct smb_filename *smb_fname = NULL;
- NTSTATUS status;
-
- status = create_synthetic_smb_fname_split(talloc_tos(), fname,
- psbuf, &smb_fname);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- DEBUG(10,("smb_set_file_dosmode: file %s : setting dos mode 0x%x\n",
- fname, (unsigned int)dosmode ));
-
- if(file_set_dosmode(conn, smb_fname, dosmode, NULL, false)) {
- DEBUG(2,("smb_set_file_dosmode: file_set_dosmode of %s failed (%s)\n",
- fname, strerror(errno)));
- TALLOC_FREE(smb_fname);
- return map_nt_error_from_unix(errno);
+ if ((dosmode != 0) && (dosmode != dos_mode(conn, smb_fname_base))) {
+ DEBUG(10,("smb_set_file_dosmode: file %s : setting dos mode "
+ "0x%x\n", smb_fname_str_dbg(smb_fname_base),
+ (unsigned int)dosmode));
+
+ if(file_set_dosmode(conn, smb_fname_base, dosmode, NULL,
+ false)) {
+ DEBUG(2,("smb_set_file_dosmode: file_set_dosmode of "
+ "%s failed (%s)\n",
+ smb_fname_str_dbg(smb_fname_base),
+ strerror(errno)));
+ status = map_nt_error_from_unix(errno);
+ goto out;
}
- *psbuf = smb_fname->st;
- TALLOC_FREE(smb_fname);
}
- return NT_STATUS_OK;
+ status = NT_STATUS_OK;
+ out:
+ TALLOC_FREE(smb_fname_base);
+ return status;
}
/****************************************************************************
const char *pdata,
int total_data,
files_struct *fsp,
- const char *fname,
- SMB_STRUCT_STAT *psbuf)
+ const struct smb_filename *smb_fname)
{
NTSTATUS status = NT_STATUS_OK;
bool delete_on_close;
}
delete_on_close = (CVAL(pdata,0) ? True : False);
- dosmode = dos_mode(conn, fname, psbuf);
+ dosmode = dos_mode(conn, smb_fname);
DEBUG(10,("smb_set_file_disposition_info: file %s, dosmode = %u, "
"delete_on_close = %u\n",
- fsp->fsp_name,
+ smb_fname_str_dbg(smb_fname),
(unsigned int)dosmode,
(unsigned int)delete_on_close ));
}
} else {
/* newname must *not* be a stream name. */
- if (is_ntfs_stream_name(newname)) {
+ if (newname[0] == ':') {
return NT_STATUS_NOT_SUPPORTED;
}
const char *pdata,
int total_data,
files_struct *fsp,
- const char *fname,
- const SMB_STRUCT_STAT *psbuf)
+ const struct smb_filename *smb_fname)
{
struct smb_file_time ft;
ZERO_STRUCT(ft);
ft.mtime = interpret_long_date(pdata + 16);
DEBUG(10,("smb_set_info_standard: file %s\n",
- fname ? fname : fsp->fsp_name ));
+ smb_fname_str_dbg(smb_fname)));
- return smb_set_file_time(conn,
- fsp,
- fname,
- psbuf,
- &ft,
- true);
+ return smb_set_file_time(conn, fsp, smb_fname, &ft, true);
}
/****************************************************************************
const char *pdata,
int total_data,
files_struct *fsp,
- const char *fname,
- SMB_STRUCT_STAT *psbuf)
+ const struct smb_filename *smb_fname)
{
/* Patch to do this correctly from Paul Eggert <eggert@twinsun.com>. */
struct timespec write_time;
/* Set the attributes */
dosmode = IVAL(pdata,32);
- status = smb_set_file_dosmode(conn, fsp, fname, psbuf, dosmode);
+ status = smb_set_file_dosmode(conn, smb_fname, dosmode);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
}
}
- DEBUG(10,("smb_set_file_basic_info: file %s\n",
- fname ? fname : fsp->fsp_name ));
+ DEBUG(10, ("smb_set_file_basic_info: file %s\n",
+ smb_fname_str_dbg(smb_fname)));
- return smb_set_file_time(conn,
- fsp,
- fname,
- psbuf,
- &ft,
- setting_write_time);
+ return smb_set_file_time(conn, fsp, smb_fname, &ft,
+ setting_write_time);
}
/****************************************************************************
const char *pdata,
int total_data,
files_struct *fsp,
- const char *fname,
- SMB_STRUCT_STAT *psbuf)
+ struct smb_filename *smb_fname)
{
- struct smb_filename *smb_fname = NULL;
uint64_t allocation_size = 0;
NTSTATUS status = NT_STATUS_OK;
files_struct *new_fsp = NULL;
- if (!VALID_STAT(*psbuf)) {
+ if (!VALID_STAT(smb_fname->st)) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
}
#endif /* LARGE_SMB_OFF_T */
- DEBUG(10,("smb_set_file_allocation_info: Set file allocation info for file %s to %.0f\n",
- fname, (double)allocation_size ));
+ DEBUG(10,("smb_set_file_allocation_info: Set file allocation info for "
+ "file %s to %.0f\n", smb_fname_str_dbg(smb_fname),
+ (double)allocation_size));
if (allocation_size) {
allocation_size = smb_roundup(conn, allocation_size);
}
- DEBUG(10,("smb_set_file_allocation_info: file %s : setting new allocation size to %.0f\n",
- fname, (double)allocation_size ));
+ DEBUG(10,("smb_set_file_allocation_info: file %s : setting new "
+ "allocation size to %.0f\n", smb_fname_str_dbg(smb_fname),
+ (double)allocation_size));
if (fsp && fsp->fh->fd != -1) {
/* Open file handle. */
/* Only change if needed. */
- if (allocation_size != get_file_size_stat(psbuf)) {
+ if (allocation_size != get_file_size_stat(&smb_fname->st)) {
if (vfs_allocate_file_space(fsp, allocation_size) == -1) {
return map_nt_error_from_unix(errno);
}
}
/* Pathname or stat or directory file. */
-
- status = create_synthetic_smb_fname_split(talloc_tos(), fname, psbuf,
- &smb_fname);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- status = SMB_VFS_CREATE_FILE(
+ status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
0, /* root_dir_fid */
&new_fsp, /* result */
NULL); /* pinfo */
- *psbuf = smb_fname->st;
- TALLOC_FREE(smb_fname);
-
if (!NT_STATUS_IS_OK(status)) {
/* NB. We check for open_was_deferred in the caller. */
return status;
}
/* Only change if needed. */
- if (allocation_size != get_file_size_stat(psbuf)) {
+ if (allocation_size != get_file_size_stat(&smb_fname->st)) {
if (vfs_allocate_file_space(new_fsp, allocation_size) == -1) {
status = map_nt_error_from_unix(errno);
close_file(req, new_fsp, NORMAL_CLOSE);
status = smb_set_file_time(conn,
fsp,
- smb_fname->base_name,
- &sbuf,
+ smb_fname,
&ft,
false);
if (modify_mtime) {
struct smb_request *req,
const char *pdata,
int total_data,
- const char *fname,
- SMB_STRUCT_STAT *psbuf)
+ struct smb_filename *smb_fname)
{
- struct smb_filename *smb_fname = NULL;
NTSTATUS status = NT_STATUS_OK;
files_struct *fsp = NULL;
uint16 flags = 0;
flags = SVAL(pdata,0);
- if (!VALID_STAT(*psbuf)) {
+ if (!VALID_STAT(smb_fname->st)) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
if ((flags == SMB_POSIX_UNLINK_DIRECTORY_TARGET) &&
- !VALID_STAT_OF_DIR(*psbuf)) {
+ !VALID_STAT_OF_DIR(smb_fname->st)) {
return NT_STATUS_NOT_A_DIRECTORY;
}
DEBUG(10,("smb_posix_unlink: %s %s\n",
(flags == SMB_POSIX_UNLINK_DIRECTORY_TARGET) ? "directory" : "file",
- fname));
+ smb_fname_str_dbg(smb_fname)));
- if (VALID_STAT_OF_DIR(*psbuf)) {
+ if (VALID_STAT_OF_DIR(smb_fname->st)) {
create_options |= FILE_DIRECTORY_FILE;
}
- status = create_synthetic_smb_fname_split(talloc_tos(), fname, psbuf,
- &smb_fname);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
&fsp, /* result */
&info); /* pinfo */
- *psbuf = smb_fname->st;
- TALLOC_FREE(smb_fname);
-
if (!NT_STATUS_IS_OK(status)) {
return status;
}
&del,
1,
fsp,
- fname,
- psbuf);
+ smb_fname);
if (!NT_STATUS_IS_OK(status)) {
close_file(req, fsp, NORMAL_CLOSE);
"(%s)\n",
smb_fname_str_dbg(smb_fname),
strerror(errno)));
- reply_unixerror(req,ERRDOS,ERRbadpath);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
} else {
"fileinfo of %s failed (%s)\n",
smb_fname_str_dbg(smb_fname),
strerror(errno)));
- reply_unixerror(req,ERRDOS,ERRbadpath);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
}
max_data_bytes);
return;
} else {
- reply_unixerror(req, ERRDOS, ERRbadpath);
+ reply_doserror(req, ERRDOS, ERRbadpath);
return;
}
} else {
DEBUG(3,("call_trans2setfilepathinfo: fstat "
"of fnum %d failed (%s)\n", fsp->fnum,
strerror(errno)));
- reply_unixerror(req, ERRDOS, ERRbadfid);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
}
"%s failed (%s)\n",
smb_fname_str_dbg(smb_fname),
strerror(errno)));
- reply_unixerror(req, ERRDOS, ERRbadpath);
+ reply_nterror(req, map_nt_error_from_unix(errno));
return;
}
}
pdata,
total_data,
fsp,
- fname,
- &sbuf);
+ smb_fname);
break;
}
pdata,
total_data,
fsp,
- fname,
- &sbuf);
+ smb_fname);
break;
}
pdata,
total_data,
fsp,
- fname,
- &sbuf);
+ smb_fname);
break;
}
pdata,
total_data,
fsp,
- fname,
- &sbuf);
+ smb_fname);
break;
}
status = smb_posix_unlink(conn, req,
pdata,
total_data,
- fname,
- &sbuf);
+ smb_fname);
break;
}