Re: ptrace

Arun Sharma (asharma@netscape.com)
Thu, 27 Nov 1997 19:26:29 -0800


Horst von Brand wrote:
>
> Arun Sharma <asharma@netscape.com> said:
> > As of 2.1.45, ptrace system calls require the calling process to be
> > the parent of the process being traced. Can we do away with this
> > restriction ? Does anyone see a problem in removing the restriction ?
>
> Security.

Actually, I was wrong. Any process can attach to a running
process and security is enforced by making sure that the
two processes have the same effective pid/gid.

However, when a process PTRACE_ATTACHes to another, the
attached process will be made the child of the attaching
process using the p_pptr field of the task_struct.

I still haven't gotten a test program that reads the
register of another process via ptrace working.
If you have one, please let me know.

-Arun