[Bug 1638] tar01/tar02 tarballs contain non-deterministic uids/gids + permissions

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Thu Jul 29 06:08:16 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1638

--- Comment #2 from Ralf Corsepius <ralf.corsepius at rtems.org> 2010-07-29 01:08:15 CDT ---
(In reply to comment #1)
> I had considered adding a file with permissions, uid/gid and md5sums which the
> test would validate.  But that would require more host magic and we had enough
> host magic to solve first.
Well, there is a much easier work-around: 
Ship a prebuilt, binary tarball, which users are not supposed to generate nor
to modify ;)

This also would circumvent all the pax/tar etc. invocation related and
make-related issues.

> A simpler solution would be something like this.
> 
> chown UUU.GGG file
> 
> where UUU and GGG are numeric ids.  But I get an error on the host
> doing that.
> 
> $ touch joel
> $ chown 7.7 joel
> chown: changing ownership of `joel': Operation not permitted
Correct. This isn't possible.

Another issue related to this would be "host filesystem features", e.g.
building on ntfs, which doesn't support a "*nix'sh" concept of permissions.

> I don't see a way in pax to force the uid/gid when you are writing.
Neither do I.

>  It looks
> like GNU tar has an option which might do this but the man page says 
> 
>  --owner=NAME
>               force NAME as owner for added files
> 
> I don't know whether using that with the option to use numeric ids will help.
Neither do I. Does tar store numeric ids? I thought, tar stores "textual ids",
but I am not sure and would not want to exclude to be "plain wrong".


That said, at present, I am leaning towards adding binary tarballs with
predefined uids/gids/permissions and not to user-generate them.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list