1

I'm trying the following:

use pseudo to pack an archive (bz2) which has files with security xattr set. use pseudo again to unpack the archive and keep the security xattr of the files.

Unfortunately, the extraction fails with the following message coming from pseudo:

$ pseudo tar -cjpf myarchive.tar.bz2 --xattrs --xattrs-include='*' myFile
# checked the contents in the meantime and looked good
$ pseudo tar -C unpack-folder/ -xpjf myarchive.tar.bz2 --xattrs --xattrs-include='*'
Warning: PSEUDO_PREFIX unset, defaulting to /home/user/tmp/.
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path myFile
couldn't allocate absolute path for 'myFile'.
tar: myFile: Cannot open: Bad address
tar: Exiting with failure status due to previous errors

pseudo: 1.9.0

tar: 1.34

Do you have any idea what could be the problem or have another idea on how to be able to preserve the xattr of the files when extracting the contents of the archive?

Tom V
  • 4,827
  • 2
  • 5
  • 22
emmerich
  • 512
  • 1
  • 5
  • 14
  • What does this have to do with embedded systems? Is it even a programming question? – Lundin Aug 26 '22 at 11:06
  • yes, of course; imagine you're working on creating a filesystem for an embedded device :) – emmerich Aug 26 '22 at 11:07
  • Is that what you are doing? Where is the source code you are having trouble with? – Lundin Aug 26 '22 at 11:08
  • there's no source code; it's part of the build system as you can see above clearly. – emmerich Aug 26 '22 at 11:27
  • I agree this has nothing to do with embedded software. The tar archive could contain pictures of cats but that doesn't mean the question is about cats. This is a question about how to *use* tar, not about how to write a program so I have also voted to close. – Tom V Aug 28 '22 at 20:00
  • However, having voted to close, I will still try to help: I suspect that the reason it does not work is because when you use tar to access a compressed archive file it forks and execs a different executable to do the compression/decompression and maybe this prevents pseudo from keeping the privileges it needs to maintain the attributes. I suggest decompressing as a separate unprivileged process and piping to pseudo tar. – Tom V Aug 28 '22 at 20:04

0 Answers0