I want to read the memory map (/proc/PID/maps) of some process without being sudo. And that is trivial, unless, the process has capabilities. See what I mean:
If I run:
$ bash
$ cat /proc/$$/maps
This works and I get the output!
But if I run:
sudo setcap "cap_net_raw+p" /bin/bash
And try the test case again:
$ bash
$ cat /proc/$$/maps
I get:
cat: /proc/1151842/maps: Permission denied
I hope this is understandable.
Thanks for your help