- store SELinux context for symlinks (#525992)

This commit is contained in:
Kamil Dudka 2009-11-18 20:36:13 +00:00
parent a30ccde1e4
commit 845a7a20b9
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/create.c b/src/create.c
index c7cf64c..f807a3d 100644
--- a/src/create.c
+++ b/src/create.c
@@ -1746,6 +1746,8 @@ dump_file0 (struct tar_stat_info *st, const char *p,
if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT) < size)
write_long_link (st);
+ xattrs_selinux_get(st, p, -1);
+
block_ordinal = current_block_ordinal ();
st->stat.st_size = 0; /* force 0 size on symlink */
header = start_header (st);

View File

@ -2,7 +2,7 @@ Summary: A GNU file archiving program
Name: tar
Epoch: 2
Version: 1.22
Release: 8%{?dist}
Release: 9%{?dist}
License: GPLv3+
Group: Applications/Archiving
URL: http://www.gnu.org/software/tar/
@ -12,6 +12,7 @@ Source2: tar.1
Patch1: tar-1.14-loneZeroWarning.patch
Patch2: tar-1.15.1-vfatTruncate.patch
Patch3: tar-1.19-xattrs.patch
Patch4: tar-1.22-store-lnk-selinux.patch
Patch5: tar-1.17-wildcards.patch
Patch6: tar-1.22-atime-rofs.patch
Patch7: tar-1.22-shortreadbuffer.patch
@ -39,6 +40,7 @@ the rmt package.
%patch1 -p1 -b .loneZeroWarning
%patch2 -p1 -b .vfatTruncate
%patch3 -p1 -b .xattrs
%patch4 -p1 -b .store-lnk-selinux
%patch5 -p1 -b .wildcards
%patch6 -p1 -b .rofs
%patch7 -p1 -b .shortread
@ -100,6 +102,9 @@ fi
%{_infodir}/tar.info*
%changelog
* Wed Nov 18 2009 Kamil Dudka <kdudka@redhat.com> 2:1.22-9
- store SELinux context for symlinks (#525992)
* Thu Aug 27 2009 Ondrej Vasik <ovasik@redhat.com> 2:1.22-8
- provide symlink manpage for gtar