From b800197970768f0b39fbac80b1be60e460a5ddc5 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 16 Aug 2016 16:31:12 +0200 Subject: [PATCH] use file_copy instead of an unsafe cp call --- PVE/VZDump/OpenVZ.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/VZDump/OpenVZ.pm b/PVE/VZDump/OpenVZ.pm index f141d8f2..5a30ade5 100644 --- a/PVE/VZDump/OpenVZ.pm +++ b/PVE/VZDump/OpenVZ.pm @@ -222,11 +222,11 @@ sub assemble { $task->{cleanup}->{etc_vzdump} = 1; mkpath "$dir/etc/vzdump/"; - $self->cmd ("cp '$conffile' '$dir/etc/vzdump/vps.conf'"); + PVE::Tools::file_copy($conffile, "$dir/etc/vzdump/vps.conf"); my $cfgdir = dirname ($conffile); foreach my $s (PVE::OpenVZ::SCRIPT_EXT) { my $fn = "$cfgdir/$vmid.$s"; - $self->cmd ("cp '$fn' '$dir/etc/vzdump/vps.$s'") if -f $fn; + PVE::Tools::file_copy($fn, "$dir/etc/vzdump/vps.$s") if -f $fn; } }