diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2012-12-07 00:49:58 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2012-12-07 01:05:31 +0000 |
commit | 179d9bb9868b0a941201566a1774ad648ebde7b5 (patch) | |
tree | 6fba233b26e1de59b35f36cf78940893c56184dc /po/sv.po | |
parent | f30f0cf83d3056caaaaacd35154ceceb4530a5e8 (diff) | |
download | sos-179d9bb9868b0a941201566a1774ad648ebde7b5.tar.gz |
Make TarArchive preserve permissions and SELinux context
Make the TarArchive class preserve permissions and SELinux context on
all files and directories it collects. This requires us to recursively
add the parent directories of any files copied in by full path (or the
directory would only be implicitly created and so receive default
ownership and permissions and no SELinux context).
To make this work, don't call tarfile.add() to recursively add
directories - the doCopyFileOrDir machinery in the Plugin class already
handles directory recursion properly. Instead when a directory is passed
to add_file(), just create a TarInfo record of type tarfile.DIRTYPE and
propagate the permissions from the host file system.
The SELinux contexts have the unfortunate side-effect of spewing errors
if unpacked without --no-selinux as some contexts cannot be placed on
some file systems.
It may be more useful to eventually store the contexts in the
in a file rather than directly in the tarball.
Before:
drwxr-xr-x. 9 root root 640 Dec 7 00:57 proc
lrwxrwxrwx. 1 root root 30 Dec 7 00:57 ps -> sos_commands/process/ps_auxwww
drwxr-xr-x. 2 root root 60 Dec 7 00:57 root
drwxr-xr-x. 2 root root 80 Dec 7 00:57 sbin
After:
dr-xr-xr-x. 9 root root 640 Dec 5 19:07 proc
lrwxrwxrwx. 1 root root 30 Dec 7 00:58 ps -> sos_commands/process/ps_auxwww
dr-xr-x---. 2 root root 60 Dec 7 00:48 root
dr-xr-xr-x. 2 root root 80 Dec 7 00:57 sbin
More fixes issue #76
Diffstat (limited to 'po/sv.po')
0 files changed, 0 insertions, 0 deletions