[PATCH] ping: try SOCK_DGRAM if no root privileges

Laurent Bercot ska-dietlibc at skarnet.org
Thu Jan 9 18:19:15 UTC 2014


>>    * make a single busybox binary with all the applets I need. My
>> busybox binary is NEVER setuid.
>>    * compile a separate small C program that tests whether
>> `basename $0` is in a list of accepted words, and if it is the
>> case, execs into "/bin/busybox `basename $0` $@". Make that separate
>> binary setuid root.
>
> Hi,
> basename is a link to which one of the busybox binaries?

  basename is the standard busybox, of course, it doesn't need setuid
privileges. But when I wrote `basename $0` here, it was a shortcut:
the actual code is C, so it's more like the basename() function. The
additional binary does not depend on busybox at all - except for the
final execve().

-- 
  Laurent



More information about the busybox mailing list