]> git.proxmox.com Git - pve-access-control.git/commitdiff
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 f541e515347ca335f1d77f2a220d6c6c80f060a3..ed340ab0de2fce9d91ee36d5e94db48e3d9620a3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-RELEASE=2.2
+RELEASE=2.3
 
 VERSION=1.0
 PACKAGE=libpve-access-control
 
 VERSION=1.0
 PACKAGE=libpve-access-control
-PKGREL=25
+PKGREL=26
 
 DESTDIR=
 PREFIX=/usr
 
 DESTDIR=
 PREFIX=/usr
index faa4fb2486e8ad5d5896cf862c1afe7da6154c8e..eb7b3c7645da60ca19106f5ec0281b9da2b13224 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 
        ($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']);
        }
            # allow if we are Datastore administrator
            $self->check($user, "/storage/$sid", ['Datastore.Allocate']);
        }
index 50b6c39fceb25cade0db7e231839d8034406683e..6e4790ea094bc23ddcab7bf232620724535784bd 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 
 libpve-access-control (1.0-25) unstable; urgency=low
 
   * add VM.Snapshot permission