misc/create_inode_libarchive.c: also allow gnu.translator xattrs
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:
misc/create_inode_libarchive.c +1 -1
@@ -442,7 +442,7 @@ static errcode_t set_inode_xattr_tar(extdl_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