Project

General

Profile

Actions

Bug #1043

open

Recursive destroy of zfs snapshot fails on non-existing target snapshot

Added by Martin Matuška almost 10 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2011-05-17
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Prior to revision 11314 if a user was recursively destroying snapshots of a dataset the target dataset was not required to exist.
The zfs_secpolicy_destroy_snaps() function introduced the security check on the target dataset, so since then if the target dataset does not exist, the recursive destroy is not performed. Before 11314, only a delete permission check on the snapshot's master dataset was performed.

Steps to reproduce:
zfs create pool/a
zfs snapshot pool/a@s1
zfs destroy -r pool@s1

Therefore I suggest to fallback to the old security check, if the target snapshot does not exist and continue with the destroy.
Patch attached.


Files

recursive_dataset_destroy.patch (811 Bytes) recursive_dataset_destroy.patch Patch Martin Matuška, 2011-05-17 02:23 PM
Actions

Also available in: Atom PDF