misc/create_inode_libarchive.c: also allow gnu.translator xattrs

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

 



Hello ext4 folks,

in my recent patch to allow e2fsprogs to create filesystems from tarballs via
libarchive I restricted the allowed xattrs to "security.capability". My
intention was probably to not allow any random xattr from the tarball onto the
filesystem.

This now creates a problem as GNU Hurd started using xattrs to store Hurd
translators in the "gnu.translator" extended attribute. With the following
patch I'm able to create a bootable GNU Hurd filesystem from a tarball:


--- a/misc/create_inode_libarchive.c
+++ b/misc/create_inode_libarchive.c
@@ -442,7 +442,7 @@ static errcode_t set_inode_xattr_tar(ext
 	dl_archive_entry_xattr_reset(entry);
 	while (dl_archive_entry_xattr_next(entry, &name, &value, &value_size) ==
 	       ARCHIVE_OK) {
-		if (strcmp(name, "security.capability") != 0)
+		if (strcmp(name, "security.capability") != 0 && strcmp(name, "gnu.translator"))
 			continue;
 
 		retval = ext2fs_xattr_set(handle, name, value, value_size);

Would that change be a good idea? I also submitted my patch as a pull request
to Ted's github repo here: https://github.com/tytso/e2fsprogs/pull/194

Or would it be a better idea to drop the sanity check for extended attribute
names? What do you think?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux