Mats Erik Andersson <[email protected]> writes:

> tisdag den 25 januari 2011 klockan 13:06 skrev Simon Josefsson detta:
>> Mats Erik Andersson <[email protected]> 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

Reply via email to