[Linux] Set permission for gdb to attach
authorMarek Habersack <grendel@twistedcode.net>
Fri, 12 Jun 2015 21:51:12 +0000 (23:51 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Fri, 12 Jun 2015 21:51:12 +0000 (23:51 +0200)
commit856436879000b60e8dbb7aac5a9e44a391898153
tree446d19d9d6b8781bd52812bd5f07caf8762cd1f2
parent729e4c1dc30692ccdc9ae7a9278265494527398a
[Linux] Set permission for gdb to attach

Most modern Linux distributions limit the ptrace scope to allow
attaching only to the direct child processes for security reasons. The
user on such machine has to modify sysctl in order to allow non-root
processes to attach to arbitrary processes, which opens up a potential
security issue. The alternative is what's implemented here - when we
crash and ask gdb to dump the stack we can bless the gdb process and allow
it to attach to our process using prctl(2)
configure.ac
mono/mini/mini-exceptions.c