tar: store the UIDs/GIDs properly in pax format (do not fail)

Resolves: #913406
Version: 2:1.26-18
This commit is contained in:
Pavel Raiskup 2013-02-21 12:57:15 +01:00
parent 06e0a0b140
commit fc99fb3b0a
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,15 @@
diff --git a/src/create.c b/src/create.c
index 25387a9..9a7a05a 100644
--- a/src/create.c
+++ b/src/create.c
@@ -514,8 +514,8 @@ start_private_header (const char *name, size_t size, time_t t)
TIME_TO_CHARS (t, header->header.mtime);
MODE_TO_CHARS (S_IFREG|S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH, header->header.mode);
- UID_TO_CHARS (getuid (), header->header.uid);
- GID_TO_CHARS (getgid (), header->header.gid);
+ UID_TO_CHARS (0, header->header.uid);
+ GID_TO_CHARS (0, header->header.gid);
MAJOR_TO_CHARS (0, header->header.devmajor);
MINOR_TO_CHARS (0, header->header.devminor);
strncpy (header->header.magic, TMAGIC, TMAGLEN);

View File

@ -5,7 +5,7 @@ Summary: A GNU file archiving program
Name: tar Name: tar
Epoch: 2 Epoch: 2
Version: 1.26 Version: 1.26
Release: 17%{?dist} Release: 18%{?dist}
License: GPLv3+ License: GPLv3+
Group: Applications/Archiving Group: Applications/Archiving
URL: http://www.gnu.org/software/tar/ URL: http://www.gnu.org/software/tar/
@ -71,6 +71,11 @@ Patch9: tar-1.26-selinux-gnulib.patch
# ~> upstream (b997c90f9, 696338043, d36f5a3cc, 085cace18, up-to ~> 83701a590) # ~> upstream (b997c90f9, 696338043, d36f5a3cc, 085cace18, up-to ~> 83701a590)
Patch10: tar-1.26-xattrs.patch Patch10: tar-1.26-xattrs.patch
# Fix problem with bit UIDs/GIDs (> 2^21) and --posix format.
# ~> #913406
# ~> upstream (it is part of df7b55a8f6354e)
Patch11: tar-1.26-posix-biguid.patch
# run "make check" by default # run "make check" by default
%bcond_without check %bcond_without check
@ -112,6 +117,7 @@ the rmt package.
%patch8 -p1 -b .skip-old-files %patch8 -p1 -b .skip-old-files
%patch9 -p1 -b .selinux-gnulib-prep %patch9 -p1 -b .selinux-gnulib-prep
%patch10 -p1 -b .xattrs-selinux-acls %patch10 -p1 -b .xattrs-selinux-acls
%patch11 -p1 -b .big_uid_gid
autoreconf -v autoreconf -v
@ -174,6 +180,9 @@ fi
%{_infodir}/tar.info* %{_infodir}/tar.info*
%changelog %changelog
* Wed Feb 20 2013 Pavel Raiskup <praiskup@redhat.com> - 2:1.26-18
- fix problems with big uids/gids and pax format (> 2^21) (#913406)
* Mon Feb 18 2013 Pavel Raiskup <praiskup@redhat.com> - 2:1.26-17 * Mon Feb 18 2013 Pavel Raiskup <praiskup@redhat.com> - 2:1.26-17
- add possibility to 'rpmbuild' without %%check phase - add possibility to 'rpmbuild' without %%check phase
- make the autoreconf phase verbose - make the autoreconf phase verbose