binding socket fails when run under ptrace?

Tom Horsley horsley1953 at
Tue Jul 26 12:59:30 UTC 2011

I just tried to run an "rsh" command under strace, and it
always gets permission denied when it tries to bind the
socket (fedora 15 64 bit). Is this some new helpful
security feature I've never heard of?

tomh> strace -o working.trace rsh tomh date
rcmd: socket: Permission denied

From the working.trace file:

bind(3, {sa_family=AF_INET, sin_port=htons(1023), sin_addr=inet_addr("")}, 16) = -1 EACCES (Permission denied)

not under strace:

tomh> rsh tomh date
Tue Jul 26 08:56:29 EDT 2011

Here's the kernel:

tomh> uname -a
Linux tomh #1 SMP Wed Jul 6 13:58:54 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Selinux is turned off, so that can't be it.

More information about the users mailing list