summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_default.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-07-02 13:39:20 -0700
committerTim Prouty <tprouty@samba.org>2009-07-06 15:38:42 -0700
commit3cb0e521e1bdddde972b6fd08fb86f7fe73da8d5 (patch)
tree22777dd2e4d6db9f30b19275a91a9dd3c21a2fbf /source3/modules/vfs_default.c
parentf39232a8fb93cfccfe1533ab613867572ff7f848 (diff)
downloadsamba-3cb0e521e1bdddde972b6fd08fb86f7fe73da8d5.tar.gz
samba-3cb0e521e1bdddde972b6fd08fb86f7fe73da8d5.tar.bz2
samba-3cb0e521e1bdddde972b6fd08fb86f7fe73da8d5.zip
s3: Plumb smb_filename through SMB_VFS_NTIMES
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r--source3/modules/vfs_default.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index c95c68fe0f..7565e7bb65 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -789,34 +789,42 @@ static char *vfswrap_getwd(vfs_handle_struct *handle, char *path)
system will support.
**********************************************************************/
-static int vfswrap_ntimes(vfs_handle_struct *handle, const char *path,
+static int vfswrap_ntimes(vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname,
struct smb_file_time *ft)
{
- int result;
+ int result = -1;
START_PROFILE(syscall_ntimes);
+
+ if (smb_fname->stream_name) {
+ errno = ENOENT;
+ goto out;
+ }
+
#if defined(HAVE_UTIMES)
if (ft != NULL) {
struct timeval tv[2];
tv[0] = convert_timespec_to_timeval(ft->atime);
tv[1] = convert_timespec_to_timeval(ft->mtime);
- result = utimes(path, tv);
+ result = utimes(smb_fname->base_name, tv);
} else {
- result = utimes(path, NULL);
+ result = utimes(smb_fname->base_name, NULL);
}
#elif defined(HAVE_UTIME)
if (ft != NULL) {
struct utimbuf times;
times.actime = convert_timespec_to_time_t(ft->atime);
times.modtime = convert_timespec_to_time_t(ft->mtime);
- result = utime(path, &times);
+ result = utime(smb_fname->base_name, &times);
} else {
- result = utime(path, NULL);
+ result = utime(smb_fname->base_name, NULL);
}
#else
errno = ENOSYS;
result = -1;
#endif
+ out:
END_PROFILE(syscall_ntimes);
return result;
}