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)
+{
+ 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_FNTIMES(handle, fsp, ft);
+ }
+
+ DBG_DEBUG("set btime for %s to %s\n", fsp_str_dbg(fsp),
+ time_to_asc(convert_timespec_to_time_t(ft->create_time)));
+
+ ad = ad_fget(talloc_tos(), handle, fsp, 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_fset(handle, ad, fsp);
+
+exit:
+
+ TALLOC_FREE(ad);
+ if (rc != 0) {
+ DBG_WARNING("%s\n", fsp_str_dbg(fsp));
+ return -1;
+ }
+ return SMB_VFS_NEXT_FNTIMES(handle, fsp, ft);
+}
+
static int fruit_fallocate(struct vfs_handle_struct *handle,
struct files_struct *fsp,
uint32_t mode,
.fstat_fn = fruit_fstat,
.streaminfo_fn = fruit_streaminfo,
.ntimes_fn = fruit_ntimes,
+ .fntimes_fn = fruit_fntimes,
.ftruncate_fn = fruit_ftruncate,
.fallocate_fn = fruit_fallocate,
.create_file_fn = fruit_create_file,