marsadm: safeguard race on readlink

This commit is contained in:
Thomas Schoebel-Theuer 2020-08-07 09:13:44 +02:00
parent 89b647a261
commit d4c64f60fd
1 changed files with 1 additions and 0 deletions

View File

@ -4067,6 +4067,7 @@ sub _replace_delete {
if (!$del_dirs{$basedir}) {
foreach my $link (lamport_glob("$basedir/delete-*")) {
my $targ = readlink($link);
next unless $targ;
$del_targets{$targ} = $link;
}
$del_dirs{$basedir} = 1;