From 5f494227b8c8c986506939b995865136aafc3ca1 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 1 Oct 2013 12:09:51 +0200 Subject: [PATCH] remove path related code from check_volume_access() --- PVE/RPCEnvironment.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/PVE/RPCEnvironment.pm b/PVE/RPCEnvironment.pm index ca845f0..52c5f64 100644 --- a/PVE/RPCEnvironment.pm +++ b/PVE/RPCEnvironment.pm @@ -14,7 +14,6 @@ use PVE::INotify; use PVE::Cluster; use PVE::ProcFSTools; use PVE::AccessControl; -use Cwd 'abs_path'; # we use this singleton class to pass RPC related environment values @@ -287,7 +286,6 @@ sub check_volume_access { # test if we have read access to volid - my $path; my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1); if ($sid) { my ($vtype, undef, $ownervm) = PVE::Storage::parse_volname($storecfg, $volid); @@ -305,13 +303,9 @@ sub check_volume_access { } else { die "Only root can pass arbitrary filesystem paths." if $user ne 'root@pam'; - - $path = abs_path($volid); - if ($path =~ m|^(/.+)$|) { - $path = $1; # untaint any path - } } - return $path; + + return undef; } sub is_group_member { -- 2.39.2