[BusyBox] followup on mount oddity from my previous email
Rob Landley
rob at landley.net
Fri Dec 12 12:14:57 UTC 2003
On Friday 12 December 2003 05:38, Robert P. J. Day wrote:
> On Fri, 12 Dec 2003, Erik Andersen wrote:
> > On Fri Dec 12, 2003 at 05:12:43AM -0500, Robert P. J. Day wrote:
> > > mount -n -t proc /proc /proc
> > > echo "Remounting the root filesystem read-write."
> > > mount -n -o remount,rw /dev/root / <-- that's failing
> >
> > Could you apply this patch to busybox and try again?
> > http://busybox.net/cgi-bin/cvsweb/busybox/util-linux/mount.c?r1=1.114&r2=
> >1.115&diff_format=u
>
> that didn't appear to make any difference.
>
> rday
You might want to look at this oddity. It's from Vladamir. I've tried asking
him what he was thinking, but he doesn't speak english.
http://www.busybox.net/cgi-bin/cvsweb/busybox/shell/ash.c?r1=1.65&r2=1.66
As far as I can tell, wheter or not "APPLETS_ALWAYS_WIN" is compiled it, the
behavior will trigger anyway as long as there's no "/" in the name. And
instead of forking and calling run_applet_by_name (which is what it used to
do, and the logical choice), it will instead call "/bin/busybox".
Now stop and think: we're running a perfectly good version of busybox already,
loaded into memory. The main reason to call the built-in behavior rather
than execing another file is we might be in a chroot environment or something
and not have access to even our own executable anymore. In additon, assuming
that it lives at /bin/busybox when it could be /usr/bin/busybox or in the
root directory or might in fact be named /bin/sh (as a standalone shell) and
there not BE a /bin/busybox... Shelling out to that is STUPID, and the
behavior before this patch was correct.
This patch broke ash. Badly. I don't know what it was trying to accomplish,
the comment calls it a "small bugfix" when it's a major (bad) behavior
change. I asked earlier, and Vladamir never replied. The patch looks really
bad to me. I _think_ that the built-in mount is being called for you, even
if you have an external mount executable, because of this patch.
Comments?
Rob
More information about the busybox
mailing list