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

Glauber Costa glommer at parallels.com
Mon May 13 00:48:31 PDT 2013


On 05/11/2013 03:53 AM, Igor M Podlesny wrote:
> 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.
> 
Indeed, it is better.




More information about the Devel mailing list