mirror of https://github.com/GNOME/gimp.git
libgimpbase: in gimp_stack_trace_print(), clear ptrace permission on exit
Clear the ptrace permission given to the child after it terminates, so that a future process that happens to have the same PID the child had can't ptrace us.
This commit is contained in:
parent
b9e629abbb
commit
a1a126c308
|
@ -1252,6 +1252,11 @@ gimp_stack_trace_print (const gchar *prog_name,
|
|||
|
||||
waitpid (pid, &status, 0);
|
||||
|
||||
#ifdef PR_SET_PTRACER
|
||||
/* Clear ptrace permission set above */
|
||||
prctl (PR_SET_PTRACER, 0, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
while ((read_n = read (out_fd[0], buffer, 256)) > 0)
|
||||
{
|
||||
/* It's hard to know if the debugger was found since it
|
||||
|
|
Loading…
Reference in New Issue