From 3eac4e35708cc7e3dafcf0bee3fdf3916cc892c1 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 13 Feb 2012 09:58:37 +0100 Subject: [PATCH] fix bug in check_volume_access (fixes vzrestore) --- Makefile | 2 +- PVE/RPCEnvironment.pm | 4 +++- changelog.Debian | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fbe521e..7fae632 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ RELEASE=2.0 VERSION=1.0 PACKAGE=libpve-access-control -PKGREL=8 +PKGREL=9 DESTDIR= PREFIX=/usr diff --git a/PVE/RPCEnvironment.pm b/PVE/RPCEnvironment.pm index d14104a..77196de 100644 --- a/PVE/RPCEnvironment.pm +++ b/PVE/RPCEnvironment.pm @@ -14,6 +14,7 @@ use PVE::INotify; use PVE::Cluster; use PVE::ProcFSTools; use PVE::AccessControl; +use Cwd 'abs_path'; use CGI; # we use this singleton class to pass RPC related environment values @@ -288,7 +289,8 @@ sub check_volume_access { # test if we have read access to volid my $path; - if (my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1)) { + my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1); + if ($sid) { my ($ownervm, $vtype); ($path, $ownervm, $vtype) = PVE::Storage::path($storecfg, $volid); if ($vtype eq 'iso' || $vtype eq 'vztmpl') { diff --git a/changelog.Debian b/changelog.Debian index 082c378..47ce771 100644 --- a/changelog.Debian +++ b/changelog.Debian @@ -1,3 +1,9 @@ +libpve-access-control (1.0-9) unstable; urgency=low + + * fix bug in check_volume_access (fixes vzrestore) + + -- Proxmox Support Team Mon, 13 Feb 2012 09:56:37 +0100 + libpve-access-control (1.0-8) unstable; urgency=low * fix return value for empty ACL list. -- 2.39.2