qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Lauri Leukkunen" <lle@rahina.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH][UPDATED] Fix path mangling in linux-user/path.c
Date: Tue, 22 May 2007 10:16:52 +0300	[thread overview]
Message-ID: <53fbb7580705220016y5b30a746oa97343fa8c137377@mail.gmail.com> (raw)
In-Reply-To: <20070522060824.GA5584@localhost.localdomain>

On 5/22/07, Kirill A. Shutemov <k.shutemov@velesys.com> wrote:
> On [Tue, 22.05.2007 02:22], Lauri Leukkunen wrote:
> > Attached patch fixes the linux-user path mangling code for use with
> > real target root filesystems that have nasty symlinks and lots of
> > files. The old code is terribly slow and can easily end up going
> > through the entire host system /usr hierarchy in a recursive loop.
> >
> > Compared to the previous version of this patch, fixes an issue with
> > attempting to free() a pointer returned by GNU basename().
>
> My patch to solve same problems attached

The added complexity of my version comes from preventing leaking out
of the "chroot" through symlinks or "../.." elements. If we have

$HOME/buildroot/usr/lib/libfoo.so.1 -> /usr/lib/libfoo.so.1.2 ->
/usr/lib/libfoo.so.1.2.3

and if the buildroot and host system have different versions of the
library, realpath can't be used. It gets a little messy, I agree. I
had to do similar logic in scratchbox2 to maintain the fake chroot.

regards, Lauri

  reply	other threads:[~2007-05-22  7:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21 23:23 [Qemu-devel] [PATCH][UPDATED] Fix path mangling in linux-user/path.c Lauri Leukkunen
2007-05-22  6:08 ` Kirill A. Shutemov
2007-05-22  7:16   ` Lauri Leukkunen [this message]
2007-06-17 16:30 ` Thiemo Seufer
2007-06-18  6:02   ` Lauri Leukkunen
2007-06-18 20:36     ` Lauri Leukkunen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53fbb7580705220016y5b30a746oa97343fa8c137377@mail.gmail.com \
    --to=lle@rahina.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).