systemd: Improve detection of executables and libraries
PATCH v2 1/1 systemd: Improve detection of executables and libraries
Use cached mode bits to detect executables independently of host access permissions. Check shared-library basenames to avoid matching directory names.
Signed-off-by Anusmita Dutta Mazumder <[email protected]>
---
Changes in v2:
- Replace the regex with basename string checks, as suggested.
meta/recipes-core/systemd/dlopen-deps.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/systemd/dlopen-deps.inc +2 -1
@@ -61,7 +61,8 @@ python package_generate_dlopen_deps() { if cpath.islink(f): continue - if os.access(f, os.X_OK) or ".so." in f or f.endswith(".so"): + # Scan shared libraries and executable files for dlopen notes. + if cpath.is_executable(f) or ".so." in os.path.basename(f) or f.endswith(".so"): try: elf = oe.qa.ELFFile(f) elf.open()