bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] [PATCH] Extended attribute support for tar


From: James Antill
Subject: [Bug-tar] [PATCH] Extended attribute support for tar
Date: Tue, 01 Aug 2006 18:10:44 -0400

 Hi, I've created support for creating/extracting SELinux/user/root
xattrs in GNUtar. If you have some free time, I'd appreciate anyone
looking over the patch and letting me know if anything needs to change
for inclusion.
 The patch is currently based against the version in Fedora Core
rawhide. And I've not even compiled it on a non-Linux system, so I
imagine that some autoconf stuff needs to be added.

 Known "issues":

1. ACL support isn't included, this might only be a couple of lines on
top of the patch.
2. No tests.
3. No documentation (outside of --help) for the --xattrs and --selinux
options.
4. xattr's are stored internally with the full xheader name, which is
exposing internal details.
5. Only supports the star "SCHILY.xattr.*" format, AIUI there's a real
POSIX format.
6. Not entirely sure what to do when SELinux/xattr's aren't supported
when doing the extraction ... atm. tar just ignores it.
7. Currently tar defaults to not doing anything when creating an
archive, so you need to pass --xattrs or --selinux to get all xattrs or
just SELinux context information in the archive. This is mainly because
of the way versions of GNUtar without this patch react.
8. AIUI star only includes the headers when using it's special exustar
format, the patch I've done for GNUtar just includes it on the else
clause of:

  if (archive_format == V7_FORMAT || numeric_owner_option)

...which probably needs to be just the former test, or maybe limited to
certain formats? Note that this means that you need to do:

 tar -cvf foo.tar foo --xattr --format=ustar

...to make archives that star understands.

 Anyway, the patch is available here (not included due to size limits):

http://people.redhat.com/jantill/patches/tar-1.15.90-xattrs.patch

-- 
James Antill <address@hidden>

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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