On 10/02/2013 06:27 PM, Rogério Brito wrote:
I have tried to use mtr on this i386-userland with amd64-kernel installation
and, when I fire up mtr via the command line on an X session (don't know if
this would be the case under other circumstances, which is why I have filed
this as important, not as grave) I get no output, no window and mtr simply
returns to the prompt.

I tried it under both a regular user account and as root, and nothing
changes.  I am using a standard Debian kernel (read: "as vanilla as
possible").

Furthermore, when I run mtr under strace, these are the last lines that I get:

,----[ strace mtr ]
| (...)
| mprotect(0xf777f000, 4096, PROT_READ)   = 0
| munmap(0xf7742000, 107301)              = 0
| socket(PF_INET, SOCK_RAW, IPPROTO_RAW)  = -1 EPERM (Operation not permitted)
| write(2, "mtr: unable to get raw sockets.\n", 32mtr: unable to get raw 
sockets.
| ) = 32
| exit_group(1)                           = ?
`----

Also, I just tried installing mtr-tiny and I get the same results with
EPERM.
Note that when you run "strace mtr", you are no longer running mtr as root, as Linux does not honor the setuid bit for ptrace'd processes. Therefore it cannot
open the raw socket it needs to create packets. From strace(1):

       -u username Run command with the user ID, group ID, and  supple‐
                   mentary  groups  of  username.   This option is only
                   useful when running as root and enables the  correct
                   execution  of setuid and/or setgid binaries.  Unless
                   this option is used setuid and setgid  programs  are
                   executed without effective privileges.

'sudo strace mtr' would work around this.

You didn't say if you ran any tests other than strace with the mtr-tiny package, but you would probably want to try running 'mtr --curses' to eliminate possible X misconfiguration problems. You may also want to check the $DISPLAY environment
variable.
--
Robert Woodcock - [email protected]
perl -e '$a-=($_%4-2)*4/$_++while++$_<2e6;print"$a\n"'


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to