[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

comportement curieux de strace[HS]



J'avais une confiance aveugle en strace... mais voilà:

francois@totoche:~$ ping www.google.fr
PING www.google.akadns.net (216.239.59.99): 56 data bytes
64 bytes from 216.239.59.99: icmp_seq=0 ttl=243 time=89.7 ms
...
francois@totoche:~$ strace ping www.google.fr 
execve("/bin/ping", ["ping", "www.google.fr"], [/* 35 vars */]) = 0
uname({sys="Linux", node="totoche", ...}) = 0
brk(0)                                  = 0x805c91c
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=42607, ...}) = 0
....
fstat64(3, {st_mode=S_IFREG|0644, st_size=1748, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40014000
read(3, "# /etc/protocols:\n# $Id: protoco"..., 4096) = 1748
close(3)                                = 0
munmap(0x40014000, 4096)                = 0
socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = -1 EPERM (Operation not
permitted)
write(2, "ping: ping must run as root\n", 28ping: ping must run as root
) = 28
_exit(2)                                = ?
francois@totoche:~$ 


et ping exige que ça soit "root" qui l'éxécute (la douille n'est pas
créee). Une explication?


François Boisson



Reply to: