diff options
author | Tim Prouty <tprouty@samba.org> | 2009-07-02 13:39:20 -0700 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-07-06 15:38:42 -0700 |
commit | 3cb0e521e1bdddde972b6fd08fb86f7fe73da8d5 (patch) | |
tree | 22777dd2e4d6db9f30b19275a91a9dd3c21a2fbf /source3/modules/vfs_cap.c | |
parent | f39232a8fb93cfccfe1533ab613867572ff7f848 (diff) | |
download | samba-3cb0e521e1bdddde972b6fd08fb86f7fe73da8d5.tar.gz samba-3cb0e521e1bdddde972b6fd08fb86f7fe73da8d5.tar.bz2 samba-3cb0e521e1bdddde972b6fd08fb86f7fe73da8d5.zip |
s3: Plumb smb_filename through SMB_VFS_NTIMES
Diffstat (limited to 'source3/modules/vfs_cap.c')
-rw-r--r-- | source3/modules/vfs_cap.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index 9348ab9554..7e363b6be7 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -301,16 +301,36 @@ static int cap_chdir(vfs_handle_struct *handle, const char *path) return SMB_VFS_NEXT_CHDIR(handle, cappath); } -static int cap_ntimes(vfs_handle_struct *handle, const char *path, +static int cap_ntimes(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, struct smb_file_time *ft) { - char *cappath = capencode(talloc_tos(), path); + struct smb_filename *smb_fname_tmp = NULL; + char *cappath = NULL; + NTSTATUS status; + int ret; + + cappath = capencode(talloc_tos(), smb_fname->base_name); if (!cappath) { errno = ENOMEM; return -1; } - return SMB_VFS_NEXT_NTIMES(handle, cappath, ft); + + /* Setup temporary smb_filename structs. */ + status = copy_smb_filename(talloc_tos(), smb_fname, + &smb_fname_tmp); + if (!NT_STATUS_IS_OK(status)) { + errno = map_errno_from_nt_status(status); + return -1; + } + + smb_fname_tmp->base_name = cappath; + + ret = SMB_VFS_NEXT_NTIMES(handle, smb_fname_tmp, ft); + + TALLOC_FREE(smb_fname_tmp); + return ret; } |