[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#774227: busybox-static: execs applets when chrooting



Package: busybox-static
Version: 1:1.22.0-14
Severity: important
Tags: patch

#599101 is back, at least in busybox-static (I have not not tested the other one):

Things like chroot /target dpkg ... do not call dpkg but instead call
busybox's internal command (which leads to quite hard to debug error
messages trying to run debootstrap).

To fix it the same patch as before is needed, which is also the
end of debian/patches/applets-fallback.patch.sav:

--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -41,5 +41,7 @@ int chroot_main(int argc UNUSED_PARAM, c
 		/*argv[2] = NULL; - already is */
 	}
 
-	BB_EXECVP_or_die(argv);
+	execvp(argv[0], argv);
+	xfunc_error_retval = (errno == ENOENT) ? 127 : 126;
+	bb_perror_msg_and_die("can't execute '%s'", argv[0]);
}



	Bernhard R. Link
-- 
F8AC 04D5 0B9B 064B 3383  C3DA AFFC 96D1 151D FFDC


Reply to: