return SMB_VFS_NEXT_UNLINK(handle, smb_fname);
}
+static int shadow_copy2_unlinkat(vfs_handle_struct *handle,
+ struct files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ int flags)
+{
+ time_t timestamp = 0;
+
+ if (!shadow_copy2_strip_snapshot(talloc_tos(), handle,
+ smb_fname->base_name,
+ ×tamp, NULL)) {
+ return -1;
+ }
+ if (timestamp != 0) {
+ errno = EROFS;
+ return -1;
+ }
+ return SMB_VFS_NEXT_UNLINKAT(handle,
+ dirfsp,
+ smb_fname,
+ flags);
+}
+
static int shadow_copy2_chmod(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
mode_t mode)
.fstat_fn = shadow_copy2_fstat,
.open_fn = shadow_copy2_open,
.unlink_fn = shadow_copy2_unlink,
+ .unlinkat_fn = shadow_copy2_unlinkat,
.chmod_fn = shadow_copy2_chmod,
.chown_fn = shadow_copy2_chown,
.chdir_fn = shadow_copy2_chdir,