[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] [PATCH] add a numeric offset option for uid and gid manipu
From: |
Glauber Costa |
Subject: |
Re: [Bug-tar] [PATCH] add a numeric offset option for uid and gid manipulations |
Date: |
Tue, 12 Mar 2013 21:33:06 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 |
On 03/12/2013 08:12 PM, Paul Eggert wrote:
> On 03/12/13 02:03, Glauber Costa wrote:
>> With that, it is extremely useful when unpacking tar archives, to be
>> able to add that offset to the end result. Specifying a user won't help,
>> since the tar archive can have many
>
> Sorry, I'm not following this part. Why can't you extract the
> tar image in a context where the mapping is already in place?
> If user "foo" is host user ID 4000, for example, and you're running
> in an environment where uid 0 maps to 10000, then presumably
> user "foo" is namespace user 14000, which is what you want, no?
>
You can - if it is a single user that owns all the files in the archive.
However, user namespaces provides a 1:1 mapping of a whole range. In the
particular context I am interested, we distribute full distribution
images. Most files are owned by root, and we would have a 0 -> x
mapping. But a lot of others are owned by all the other users in the
system (sshd, ntp, apache, etc). So you would have to map 0 -> x, 1 -> x
+ 1, 2 -> x + 2, etc, for all the available range.
The option I am proposing sums an offset, therefore it will map
correctly the whole range.
Re: [Bug-tar] [PATCH] add a numeric offset option for uid and gid manipulations,
Glauber Costa <=