]> git.proxmox.com Git - pve-access-control.git/blobdiff - PVE/RPCEnvironment.pm
check_volume_access : use parse_volname instead path
[pve-access-control.git] / PVE / RPCEnvironment.pm
index 765008eee5c63a5ee0b3ae591c25da372f770153..ca845f0f8b5efe8aaba3b6471bee860847eca17d 100644 (file)
@@ -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)) {