than POSIX.
*******************************************************************/
-int file_ntimes(connection_struct *conn, const struct smb_filename *smb_fname,
+int file_ntimes(connection_struct *conn,
+ files_struct *fsp,
struct smb_file_time *ft)
{
int ret = -1;
return 0;
}
- if(SMB_VFS_NTIMES(conn, smb_fname, ft) == 0) {
+ if (SMB_VFS_NTIMES(conn, fsp->fsp_name, ft) == 0) {
return 0;
}
/* Check if we have write access. */
if (can_write_to_file(conn,
- conn->cwd_fsp,
- smb_fname))
+ conn->cwd_fsp,
+ fsp->fsp_name))
{
/* We are allowed to become root and change the filetime. */
become_root();
- ret = SMB_VFS_NTIMES(conn, smb_fname, ft);
+ ret = SMB_VFS_NTIMES(conn, fsp->fsp_name, ft);
unbecome_root();
}
if (!is_omit_timespec(&ft.mtime)) {
round_timespec(conn->ts_res, &ft.mtime);
- file_ntimes(conn, fsp->fsp_name, &ft);
+ file_ntimes(conn, fsp, &ft);
}
ok = mark_share_mode_disconnected(lck, fsp);
NTSTATUS file_set_sparse(connection_struct *conn,
struct files_struct *fsp,
bool sparse);
-int file_ntimes(connection_struct *conn, const struct smb_filename *smb_fname,
+int file_ntimes(connection_struct *conn,
+ files_struct *fsp,
struct smb_file_time *ft);
bool set_sticky_write_time_path(struct file_id fileid, struct timespec mtime);
bool set_sticky_write_time_fsp(struct files_struct *fsp,
DEBUG(10,("smb_set_file_time: setting utimes to modified values.\n"));
- ret = file_ntimes(conn, set_fsp->fsp_name, ft);
+ ret = file_ntimes(conn, set_fsp, ft);
if (ret != 0) {
return map_nt_error_from_unix(errno);
}