projects
/
pve-access-control.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check_volume_access : use parse_volname instead path
[pve-access-control.git]
/
PVE
/
RPCEnvironment.pm
diff --git
a/PVE/RPCEnvironment.pm
b/PVE/RPCEnvironment.pm
index 765008eee5c63a5ee0b3ae591c25da372f770153..ca845f0f8b5efe8aaba3b6471bee860847eca17d 100644
(file)
--- 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 $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)) {
if ($vtype eq 'iso' || $vtype eq 'vztmpl') {
# we simply allow access
} elsif (defined($ownervm) && defined($vmid) && ($ownervm == $vmid)) {