qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] -chroot and -su options.


From: Rob Landley
Subject: Re: [Qemu-devel] [PATCH] -chroot and -su options.
Date: Fri, 14 Mar 2008 10:26:45 -0500
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]