ldx / python-iptables

Python bindings for iptables
730 stars 182 forks source link

ldconfig packaged in glibc-2.28 has a different out out than ldconfig in glibc-2.17 #329

Closed AZaugg closed 1 year ago

AZaugg commented 1 year ago

The regex used in xtables.py to identify the XTABLES_LIBDIR path no longer works on systems that use glibc > 2.28.

rpm -qa|grep glibc-\d
glibc-devel-2.28-164.el8.x86_64

ldconfig -N -v|grep lib64
/lib64: (from <builtin>:0)
/lib64/sse2: (hwcap: 0x0000000000000001) (from <builtin>:0)
/lib64/tls: (hwcap: 0x8000000000000000) (from <builtin>:0)

Versus a system that uses an older version of glibc

rpm -qa|grep glibc
glibc-2.17-326.el7_9.x86_64

ldconfig -N -v|grep lib64
/lib64:
/lib64/sse2: (hwcap: 0x0000000004000000)
/lib64/tls: (hwcap: 0x8000000000000000)

As you see from the above output, you can see that the new version of glibc appends some additional information onto the end. The regex here <'^(/.*):$'> does not account for this.