qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH][UPDATED] Fix path mangling in linux-user/path.c


From: Lauri Leukkunen
Subject: Re: [Qemu-devel] [PATCH][UPDATED] Fix path mangling in linux-user/path.c
Date: Tue, 22 May 2007 10:16:52 +0300

On 5/22/07, Kirill A. Shutemov <address@hidden> 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 via email to

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