return SMB_VFS_NEXT_CHFLAGS(handle, smb_fname, flags);
}
+static int shadow_copy2_fchflags(vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ unsigned int flags)
+{
+ time_t timestamp = 0;
+
+ if (!shadow_copy2_strip_snapshot(talloc_tos(),
+ handle,
+ fsp->fsp_name,
+ ×tamp,
+ NULL)) {
+ return -1;
+ }
+ if (timestamp != 0) {
+ errno = EROFS;
+ return -1;
+ }
+ return SMB_VFS_NEXT_FCHFLAGS(handle, fsp, flags);
+}
+
static ssize_t shadow_copy2_getxattr(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *aname,
.getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
.fsetxattr_fn = shadow_copy2_fsetxattr,
.chflags_fn = shadow_copy2_chflags,
+ .fchflags_fn = shadow_copy2_fchflags,
.get_real_filename_fn = shadow_copy2_get_real_filename,
.pwrite_fn = shadow_copy2_pwrite,
.pwrite_send_fn = shadow_copy2_pwrite_send,