From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JaC2Z-00061k-7O for qemu-devel@nongnu.org; Fri, 14 Mar 2008 11:41:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JaC2X-00061M-Ly for qemu-devel@nongnu.org; Fri, 14 Mar 2008 11:41:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaC2X-00061J-I1 for qemu-devel@nongnu.org; Fri, 14 Mar 2008 11:41:49 -0400 Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5] helo=grelber.thyrsus.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JaC2X-0001Ed-CG for qemu-devel@nongnu.org; Fri, 14 Mar 2008 11:41:49 -0400 From: Rob Landley Subject: Re: [Qemu-devel] [PATCH] -chroot and -su options. Date: Fri, 14 Mar 2008 10:26:45 -0500 References: <200803031828.22657.rob@landley.net> <200803060047.13113.rob@landley.net> <20080314140857.GE17978@edgar.se.axis.com> In-Reply-To: <20080314140857.GE17978@edgar.se.axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803141026.45682.rob@landley.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: qemu-devel@nongnu.org On Friday 14 March 2008 09:08:57 Edgar E. Iglesias wrote: > > Even then, attempting to deal with things like symlinks that point to > > absolute paths would be quite a headache, and considering the default > > busybox install does exactly that, it's not exactly an unheard of corner > > case... > > Hmm, our (axis) version of busybox uses relative paths for all symbolic > links. It might be patched though, I haven't dug very deep. But otherwise > yes, absolute symbolic links need to be considered with the sysroot > approach. It might help if you make "--sysroot" a synonym for "-L" and _document_ that it affects all application emulation syscalls. But also document that it's not a full solution. (In addition to relative paths, remember that symlinks can resolve to other symlinks, and that every path component can be a symlink so in a path like "one/two/three" if "two" is a symlink to "../walrus/fruitbasket" and "walrus" is another symlink.... Implementing "readlink -f" isn't trivial. I should know, I worked out how to do it properly for toybox but haven't had time yet.) Probably the easiest thing to do for the moment is have both the --chroot and the --sysroot options. > Best regards Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.