[pve-devel] [PATCH v2 manager 1/2] vzdump: safer cp call

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Jul 7 10:22:24 CEST 2016


---
 PVE/VZDump.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 1e00c2d..45baca6 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -1067,7 +1067,7 @@ sub exec_backup_task {
     close ($logfd) if $logfd;
     
     if ($task->{tmplog} && $task->{logfile}) {
-	system ("cp '$task->{tmplog}' '$task->{logfile}'");
+	system {'cp'} 'cp', $task->{tmplog}, $task->{logfile};
     }
 
     eval { $self->run_hook_script ('log-end', $task); };
-- 
2.1.4




More information about the pve-devel mailing list