]> git.proxmox.com Git - pve-container.git/commitdiff
prevent snapshot name 'vzdump' from user
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 10 Feb 2016 14:04:11 +0000 (15:04 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 10 Feb 2016 16:38:21 +0000 (17:38 +0100)
if someone makes a snapshot named 'vzdump', it would get deleted
when using vzdump in snapshot mode, since we use that name for
making a temporary one

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/API2/LXC/Snapshot.pm

index 7e3bf4993a26719fbf7c8b603a7130a5f97147f4..36bbbf7d8120d419f0f1ef7b182cfa075bfec775 100644 (file)
@@ -123,6 +123,9 @@ __PACKAGE__->register_method({
        die "unable to use snapshot name 'current' (reserved name)\n"
            if $snapname eq 'current';
 
+       die "unable to use snapshot name 'vzdump' (reserved name)\n"
+           if $snapname eq 'vzdump';
+
        my $realcmd = sub {
            PVE::Cluster::log_msg('info', $authuser, "snapshot container $vmid: $snapname");
            PVE::LXC::snapshot_create($vmid, $snapname, $param->{description});