From: Samuel Cabrero Date: Tue, 13 Apr 2021 15:19:50 +0000 (+0200) Subject: s3: VFS: fruit: Remove SMB_VFS_NTIMES() X-Git-Tag: tevent-0.11.0~1128 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23c27b7f8225bc824160b63c161b118a4511c068;p=thirdparty%2Fsamba.git s3: VFS: fruit: Remove SMB_VFS_NTIMES() Signed-off-by: Samuel Cabrero Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 77f999abba0..eabed7eb883 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -3872,46 +3872,6 @@ static NTSTATUS fruit_streaminfo(vfs_handle_struct *handle, return NT_STATUS_OK; } -static int fruit_ntimes(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - struct smb_file_time *ft) -{ - int rc = 0; - struct adouble *ad = NULL; - struct fruit_config_data *config = NULL; - - SMB_VFS_HANDLE_GET_DATA(handle, config, struct fruit_config_data, - return -1); - - if ((config->meta != FRUIT_META_NETATALK) || - is_omit_timespec(&ft->create_time)) - { - return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft); - } - - DEBUG(10,("set btime for %s to %s\n", smb_fname_str_dbg(smb_fname), - time_to_asc(convert_timespec_to_time_t(ft->create_time)))); - - ad = ad_get(talloc_tos(), handle, smb_fname, ADOUBLE_META); - if (ad == NULL) { - goto exit; - } - - ad_setdate(ad, AD_DATE_CREATE | AD_DATE_UNIX, - convert_time_t_to_uint32_t(ft->create_time.tv_sec)); - - rc = ad_set(handle, ad, smb_fname); - -exit: - - TALLOC_FREE(ad); - if (rc != 0) { - DEBUG(1, ("fruit_ntimes: %s\n", smb_fname_str_dbg(smb_fname))); - return -1; - } - return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft); -} - static int fruit_fntimes(vfs_handle_struct *handle, files_struct *fsp, struct smb_file_time *ft) @@ -5249,7 +5209,6 @@ static struct vfs_fn_pointers vfs_fruit_fns = { .lstat_fn = fruit_lstat, .fstat_fn = fruit_fstat, .streaminfo_fn = fruit_streaminfo, - .ntimes_fn = fruit_ntimes, .fntimes_fn = fruit_fntimes, .ftruncate_fn = fruit_ftruncate, .fallocate_fn = fruit_fallocate,