Skip to content

Commit b7821ec

Browse files
committed
Ignore recreated symlink metadata in shared library ownership checks
1 parent 3975eaa commit b7821ec

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/StaticPHP/Util/SharedLibraryManifest.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,10 @@ private function snapshot(): array
487487
}
488488
if ($file->isFile() || $file->isLink()) {
489489
$stat = lstat($file->getPathname());
490-
$result[$relative] = [$this->digest($file->getPathname()), $stat['ino'], $stat['mtime'], $stat['mode']];
490+
// Alpine ldconfig recreates unchanged SONAME symlinks.
491+
$result[$relative] = $file->isLink()
492+
? [$this->digest($file->getPathname()), $stat['mode']]
493+
: [$this->digest($file->getPathname()), $stat['ino'], $stat['mtime'], $stat['mode']];
491494
}
492495
}
493496
ksort($result);

0 commit comments

Comments
 (0)