[Toybox] Question about ping.

Рысь lynx at sibserver.ru
Sun Oct 12 23:04:30 PDT 2014



13 октября 2014 г. 13:53:48 KRAT, Rob Landley <rob at landley.net> пишет:
>On 10/13/14 00:29, Рысь wrote:
>> 13 октября 2014 г. 8:51:13 KRAT, Rob Landley <rob at landley.net> пишет:
>>> My question is: should I _also_ include the old raw socket support
>(as
>>> a
>>> fallback? With a config option?) or is it good enough to just have
>this
>>> and not support ping on 2.6 kernels? (It's easy enough to make it
>>> compile even when it does work, or to have a compile-time probe to
>>> switch it off in defconfig...)
>>>
>> 
>> Will ping work when invoked by root or not in that case?
>
>The new way does not require ping to run as root.
>
>> The old and always worked way is prefferable IMO. Is there a reason
>to change?
>> I, for example, use ping (and other such tools) with a universal
>setuid wrapper
>> which (re)execs it as "user,root:user,user". I do not want any
>breakage here in future.
>
>Toybox has its own suid handling, which requires the suid bit on the
>toybox executable. (Or you can build a toybox executable with just the
>suid commands and a second one with the non suid commands, and point
>the
>symlinks appropriately.)
>
>The thing is, Linux added an API that lets you do the same thing
>without
>requiring root access to do so. Seems like an improvement, especially
>since toybox isn't always installed with the suid bit set. (So you have
>to run things _as_ root to use the stuff requiring root.)

So toybox ping will work regardless of kernel version, even 2.6.1x?

>
>Rob
>_______________________________________________
>Toybox mailing list
>Toybox at lists.landley.net
>http://lists.landley.net/listinfo.cgi/toybox-landley.net


 1413180270.0


More information about the Toybox mailing list