mirror of https://github.com/schoebel/mars
marsadm: safeguard race on readlink
This commit is contained in:
parent
89b647a261
commit
d4c64f60fd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue