Re: Problem: strace -ff fails on 2.4.21-rc1

Chuck Ebbert (76306.1226@compuserve.com)
Fri, 9 May 2003 03:50:30 -0400


Ingo Oeser wrote:

>> # strace -q -o minicom.trc -tt -ff minicom
>> upeek: ptrace(PTRACE_PEEKUSER, ... ): Operation not permitted
>> detach: ptrace(PTRACE_CONT, ...): Operation not permitted
>> Device /dev/ttyS1 lock failed: No child processes.
>> # uname -a
>> Linux d2 2.4.21-rc1 #1 SMP Wed May 7 06:05:31 EDT 2003 i686 unknown
>
> Is minicom a SUID binary, like on my machine? E.g. does
>
> ls -la $(which minicom)
>
> show
>
> -rwxr-sr-x 1 root uucp 130664 Feb 21 1998 /usr/bin/minicom
>
> ?
>
> SUID binaries cannot be ptrace()d under Linux for security reasons.

No, it's not suid. Rather than do that I changed the permissions
on /dev/ttyS1 so my normal userid could open it.

And the strace works -- until minicom forks and then the trace fails
to attach to the child. Both root and a normal userid fail with the
above messages; it works on 2.5.68.

(BTW does minicom work for you on 2.5? It fails with the "No child
processes" message on 2.5.6x here but works on 2.4 when it's not being
traced. Just the very act of running it under strace on 2.4 makes it
fail the same way it does on 2.5 here. And stracing it on 2.5.66 made
it start working again! Something very strange is going on...)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/