From 4c9f6d309118f77c2331f5dcc29cd35fcadd771f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 16 Jul 2024 10:11:52 -0400 Subject: [PATCH] Put swap file File::find into an eval because it can die. --- scripts/zmaudit.pl.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/zmaudit.pl.in b/scripts/zmaudit.pl.in index 1995c16ffd..aefd94b106 100644 --- a/scripts/zmaudit.pl.in +++ b/scripts/zmaudit.pl.in @@ -841,9 +841,11 @@ FROM `Frames` WHERE `EventId`=?'; unlink( split( /;/, $untainted_old_files ) ); } - # Now delete any old swap files - ( my $swap_image_root ) = ( $Config{ZM_PATH_SWAP} =~ /^(.*)$/ ); # De-taint - File::Find::find( { wanted=>\&deleteSwapImage, untaint=>1 }, $swap_image_root ); + eval { + # Now delete any old swap files + ( my $swap_image_root ) = ( $Config{ZM_PATH_SWAP} =~ /^(.*)$/ ); # De-taint + File::Find::find( { wanted=>\&deleteSwapImage, untaint=>1 }, $swap_image_root ); + }; # Prune the Logs table if required if ( $Config{ZM_LOG_DATABASE_LIMIT} ) {