fix access permissions for backup files
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Feb 2013 09:01:04 +0000 (10:01 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Feb 2013 09:01:04 +0000 (10:01 +0100)
bump version to 1.0-26

Makefile
PVE/RPCEnvironment.pm
changelog.Debian

index f541e51..ed340ab 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-RELEASE=2.2
+RELEASE=2.3
 
 VERSION=1.0
 PACKAGE=libpve-access-control
-PKGREL=25
+PKGREL=26
 
 DESTDIR=
 PREFIX=/usr
index faa4fb2..eb7b3c7 100644 (file)
@@ -295,7 +295,12 @@ sub check_volume_access {
        ($path, $ownervm, $vtype) = PVE::Storage::path($storecfg, $volid);
        if ($vtype eq 'iso' || $vtype eq 'vztmpl') {
            # we simply allow access 
-       } elsif (!$ownervm || ($ownervm != $vmid)) {
+       } elsif (defined($ownervm) && defined($vmid) && ($ownervm == $vmid)) {
+           # we are owner - allow access 
+       } elsif ($vtype eq 'backup' && $ownervm) {
+           $self->check($user, "/storage/$sid", ['Datastore.AllocateSpace']);
+           $self->check($user, "/vms/$ownervm", ['VM.Backup']);
+       } else {
            # allow if we are Datastore administrator
            $self->check($user, "/storage/$sid", ['Datastore.Allocate']);
        }
index 50b6c39..6e4790e 100644 (file)
@@ -1,3 +1,9 @@
+libpve-access-control (1.0-26) unstable; urgency=low
+
+  * check_volume_access: fix access permissions for backup files
+
+ -- Proxmox Support Team <support@proxmox.com>  Thu, 28 Feb 2013 10:00:14 +0100
+
 libpve-access-control (1.0-25) unstable; urgency=low
 
   * add VM.Snapshot permission