Skip to content

Instantly share code, notes, and snippets.

@droberson
Created August 29, 2020 17:43
Show Gist options
  • Save droberson/123b852612a35f53ee9428f0152ed16b to your computer and use it in GitHub Desktop.
Save droberson/123b852612a35f53ee9428f0152ed16b to your computer and use it in GitHub Desktop.
#!/bin/bash
PIDS=$(pidof sshd)
for pid in $PIDS;
do
for lib in $(cat /proc/$pid/maps |awk {'print $6'} |grep ^/ |sort |uniq);
do
rpm -q --whatprovides $lib |grep " package"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment