[BusyBox] Improving Our Development Process

Vladimir N. Oleynik dzo at simtreas.ru
Thu Jan 25 16:31:35 UTC 2001


"Vladimir N. Oleynik" wrote:
> 
> Matt Kraai wrote:
> >         if (applet->need_suid != TRUE) {
> >                 setuid(getuid());
> >                 setgid(getgid());
> >         }
> >
> 
> $ su
> Pass: XXX
> # rm -rf / && echo Ok
> Ok

And
1) Thus, a setuid-root program wishing to  temporarily  drop  root
privi-leges,  assume  the  identity  of a non-root user, and then regain
root privileges afterwards cannot use setuid.  You can accomplish this  with
the (non-POSIX, BSD) call seteuid.
2) Current `root' (Not busybox) itself should solve, and whether in
general it is necessary to have setuid `mount' (for example).


--w
vodz





More information about the busybox mailing list