[Toybox] setuid (TOYFLAG_STAYROOT) requirement - in nested case

Ashwini Sharma ak.ashwini at gmail.com
Fri May 10 01:29:46 PDT 2013


Hey Rob,

   I have a case, where setuid is required in nested case.

nested case:
  lets say there are two commands in toybox called __acmd__ and __bcmd__.
__acmd__ doesn't require setuid bit, whereas __bcmd__ does require setuid
bit.

Take a case where __acmd__ will run/launch __bcmd__. Now since __acmd__
doesn't need TOYFLAG_STAYROOT, this sets the euid to be of uid in
toy_init() function.
When __bcmd__ is run from __acmd__, this would have lost the setuid bit and
hence fails to run due to this.

Pls do give your opinion on the same.

regards,
Ashwini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130510/d06d113e/attachment-0004.htm>


More information about the Toybox mailing list