mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
analyze: Add dlopen-metadata verb
systemd-analyze dlopen-metadata will show dlopen metadata in the ELF binary.
This commit is contained in:
@@ -1006,7 +1006,16 @@ systemd-analyze security --threshold=25 --offline=true \
|
||||
rm /tmp/img/usr/lib/systemd/system/testfile.service
|
||||
|
||||
if systemd-analyze --version | grep -q -F "+ELFUTILS"; then
|
||||
systemd-analyze inspect-elf /lib/systemd/systemd
|
||||
systemd-analyze inspect-elf --json=short /lib/systemd/systemd | grep -q -F '"elfType":"executable"'
|
||||
|
||||
# For some unknown reason the .note.dlopen sections are removed when building with sanitizers, so only
|
||||
# run this test if we're not running under sanitizers.
|
||||
if [[ ! -v ASAN_OPTIONS ]]; then
|
||||
shared="$(ldd /lib/systemd/systemd | grep shared | cut -d' ' -f3)"
|
||||
systemd-analyze dlopen-metadata "$shared"
|
||||
systemd-analyze dlopen-metadata --json=short "$shared"
|
||||
fi
|
||||
fi
|
||||
|
||||
systemd-analyze --threshold=90 security systemd-journald.service
|
||||
|
||||
Reference in New Issue
Block a user