| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
echo "deb http://deb.debian.org/debian-debug/ $(lsb_release -cs)-debug main" > /etc/apt/sources.list.d/coreutils.debug.list |
| 4 |
apt-get update |
| 5 |
|
| 6 |
arch="$(uname -r | egrep -o '[a-z0-9]+$')" |
| 7 |
apt-get -y install linux-headers-${arch} linux-image-${arch}-dbg coreutils-dbgsym 2>&1 |
| 8 |
|
| 9 |
rm /etc/apt/sources.list.d/coreutils.debug.list |
| 10 |
|
| 11 |
target_kernel="$(dpkg -l linux-headers-\* | awk '/^ii/ { print $2 ; exit }' | sed s/linux-headers-//)" |
| 12 |
|
| 13 |
stap -r "$target_kernel" -L 'process("/bin/ls").function("*format_user*")' | grep -q uid_t |