nowsecure / fsmon

monitor filesystem on iOS / OS X / Android / FirefoxOS / Linux
https://www.nowsecure.com
MIT License
881 stars 151 forks source link

getProcName chop processname in Linux #19

Open trufae opened 8 years ago

crowell commented 8 years ago

this is a kernel setting

http://lxr.free-electrons.com/source/include/linux/sched.h#L315

TASK_COMM_LEN is set to 16, this requires a kernel recompilation to change.

you can use /proc/$PID/cmdline, but then you have to do all sorts of funky stuff to parse out the program name (which also isn't guaranteed to be the same as the TASK_COMM