binding socket fails when run under ptrace?

Tom Horsley horsley1953 at gmail.com
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:

socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(1023), sin_addr=inet_addr("0.0.0.0")}, 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 2.6.38.8-35.fc15.x86_64 #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