Created
August 29, 2020 17:44
-
-
Save droberson/d24771263dde4696b752fdc218947396 to your computer and use it in GitHub Desktop.
verify maps of libs loaded into a process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PIDS=$(pidof sshd) | |
PACKAGES="" | |
for pid in $PIDS; | |
do | |
for lib in $(cat /proc/$pid/maps |awk {'print $6'} |grep ^/ |sort |uniq); | |
do | |
PACKAGES="$PACKAGES $(rpm -q --whatprovides $lib)" | |
done | |
done | |
for package in $(echo $PACKAGES |tr ' ' '\n' |sort | uniq) | |
do | |
rpm -V $package | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment