X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=blobdiff_plain;f=PVE%2FRPCEnvironment.pm;h=ca845f0f8b5efe8aaba3b6471bee860847eca17d;hp=765008eee5c63a5ee0b3ae591c25da372f770153;hb=854f1dceb6f1bb733518a8a77df670768d9f5392;hpb=36ad0763f4f42e2b008093e34ec9bc28ce052e52 diff --git a/PVE/RPCEnvironment.pm b/PVE/RPCEnvironment.pm index 765008e..ca845f0 100644 --- a/PVE/RPCEnvironment.pm +++ b/PVE/RPCEnvironment.pm @@ -290,8 +290,7 @@ sub check_volume_access { my $path; my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1); if ($sid) { - my ($ownervm, $vtype); - ($path, $ownervm, $vtype) = PVE::Storage::path($storecfg, $volid); + my ($vtype, undef, $ownervm) = PVE::Storage::parse_volname($storecfg, $volid); if ($vtype eq 'iso' || $vtype eq 'vztmpl') { # we simply allow access } elsif (defined($ownervm) && defined($vmid) && ($ownervm == $vmid)) {