From 32ef45aee273244cdf43147ee01705d1c1921dff Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 21 Mar 2017 11:56:49 +0100 Subject: [PATCH] INotify.pm: use Clone::clone instead of Storable::dclone I run into seroius troubles with dclone, which seem to be buggy with tainted flag ... Also, documentation states Clone::clone is much faster. --- src/PVE/INotify.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index c2055b6..b2a5802 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -15,7 +15,7 @@ use PVE::SafeSyslog; use PVE::Exception qw(raise_param_exc); use PVE::Tools; use PVE::ProcFSTools; -use Storable qw(dclone); +use Clone qw(clone); use Linux::Inotify2; use base 'Exporter'; use JSON; @@ -247,7 +247,7 @@ sub read_file { my $ret; if (!$noclone && ref ($ccinfo->{data})) { - $ret->{data} = dclone ($ccinfo->{data}); + $ret->{data} = clone ($ccinfo->{data}); } else { $ret->{data} = $ccinfo->{data}; } @@ -269,7 +269,7 @@ sub read_file { } # we cache data with references, so we always need to - # dclone this data. Else the original data may get + # clone this data. Else the original data may get # modified. $ccinfo->{data} = $res; @@ -278,7 +278,7 @@ sub read_file { my $ret; if (!$noclone && ref ($ccinfo->{data})) { - $ret->{data} = dclone ($ccinfo->{data}); + $ret->{data} = clone ($ccinfo->{data}); } else { $ret->{data} = $ccinfo->{data}; } -- 2.39.2