[Devel] [PATCH v3 7/9] modify tar extraction to account for user namespace

Igor M Podlesny openvz at poige.ru
Fri May 10 16:53:25 PDT 2013


On 30 April 2013 13:16, Glauber Costa <glommer at openvz.org> wrote:
> From: Glauber Costa <glommer at parallels.com>
> To work around that, we can employ a trick to allow container creation right
> now, as well as to avoid compatibility problems: we will resort to LD_PRELOAD
> to load a schim that captures calls to the chown family of system calls and
> applies the offset manually.
>
> Signed-off-by: Glauber Costa <glommer at parallels.com>
[...]
> +chown_preload_if_needed()
> +{
> +       [ -z "$UID_OFFSET" -o -z "$GID_OFFSET" ] && return
> +
> +       export LD_PRELOAD=libvzchown.so

   LD_PRELOAD can be stacked (say, LD_PRELOAD=lib1:lib2:lib3) and in
case it was already set, it's better be kept.

--



More information about the Devel mailing list