fix access permissions for backup files

bump version to 1.0-26
This commit is contained in:
Dietmar Maurer 2013-02-28 10:01:04 +01:00
parent 37d6e4772e
commit e5ae548727
3 changed files with 14 additions and 3 deletions

View File

@ -1,8 +1,8 @@
RELEASE=2.2
RELEASE=2.3
VERSION=1.0
PACKAGE=libpve-access-control
PKGREL=25
PKGREL=26
DESTDIR=
PREFIX=/usr

View 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']);
}

View 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