>>>>> "Joakim" == Joakim Tjernlund <[EMAIL PROTECTED]> writes:

 Joakim> trying to ping as a non root user in bb v1.7.3 gives me this:
 Joakim> ping 192.168.1.10
 Joakim> PING 192.168.1.10 (192.168.1.10): 56 data bytes
 Joakim> ping: permission denied. (are you root?)

 Joakim> strace ping 192.168.1.10 shows:
 Joakim> read(5, "# /etc/protocols:\n# $Id: protoco"..., 4096) = 1865
 Joakim> close(5)                                = 0
 Joakim> munmap(0x3001a000, 4096)                = 0
 Joakim> socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = -1 EPERM (Operation not 
permitted)
 Joakim> write(2, "ping: permission denied. (are yo"..., 41ping: permission 
denied. (are you root?)
 Joakim> ) = 41
 Joakim> munmap(0x30018000, 4096)                = 0
 Joakim> exit_group(1)                           = ?

 Joakim> Ping tries to open a raw socket and only root can do that.

Is your busybox executable setuid root? It has to be for ping to work
(just like the normal ping is), E.G.:

./busybox ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
ping: permission denied. (are you root?)

sudo chmod +s busybox
./busybox ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: seq=0 ttl=255 time=0.840 ms
64 bytes from 10.0.0.1: seq=1 ttl=255 time=0.812 ms
64 bytes from 10.0.0.1: seq=2 ttl=255 time=0.830 ms

-- 
Bye, Peter Korsgaard
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to