[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-inetutils] Re: [PATCH] traceroute: Remove geteuid test.
From: |
Simon Josefsson |
Subject: |
[bug-inetutils] Re: [PATCH] traceroute: Remove geteuid test. |
Date: |
Tue, 25 Jan 2011 18:06:46 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) |
Mats Erik Andersson <address@hidden> writes:
> tisdag den 25 januari 2011 klockan 13:06 skrev Simon Josefsson detta:
>> Mats Erik Andersson <address@hidden> writes:
>>
>> > - if (geteuid () != 0)
>> > - error (EXIT_FAILURE, EPERM, "insufficient permissions");
>>
>> How does the error message look when there is insufficient permission
>> with that patch applied? Will the error message be cryptic?
>
> Identical messages with '-Mudp' and '-Micmp':
>
> GNU/Linux, GNU/kFreeBSD, FreeBSD issue EPERM:
>
> $ ./src/traceroute -Micmp ftp.sunet.se
> traceroute to ftp.sunet.se (194.71.11.69), 64 hops max
> ./src/traceroute: socket: Operation not permitted
>
> OpenBSD issues EACCES:
>
> $ ./src/traceroute -Micmp ftp.sunet.se
> traceroute to ftp.sunet.se (194.71.11.69), 64 hops max
> ./src/traceroute: socket: Permission denied
>
> The resulting message is the native statement in each system
> for the failure to create a raw socket.
Great. I was just worried that by removing the high-level check with a
clear error in it, we would run into some low-level check that bails out
with a incomprehensible error message.
/Simon