merge #5194 into opencontainers/runc:main

Akhil Mohan (1):
  use POSIX regex in libpathrs build

LGTMs: kolyshkin cyphar
This commit is contained in:
Aleksa Sarai
2026-03-25 02:57:28 +11:00
+1 -1
View File
@@ -99,7 +99,7 @@ function build_libpathrs() {
# /proc/self/maps and parse out the parent directory of the libc.so being
# used.
local native_libdir libdir=
native_libdir="$(awk '$NF ~ /\/libc\>.*\.so/ { print $NF; }' /proc/self/maps |
native_libdir="$(awk '$NF ~ /\/libc([.-].*)?\.so/ { print $NF }' /proc/self/maps |
sort -u | head -n1 | xargs dirname)"
if [[ "$native_libdir" == "$dest/"* ]]; then
libdir="$native_libdir"