rpms/tar/devel tar-1.15.90-permissions.patch, NONE, 1.1 tar.spec, 1.39, 1.40
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Jul 18 14:34:27 UTC 2006
Author: pvrabec
Update of /cvs/dist/rpms/tar/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10916
Modified Files:
tar.spec
Added Files:
tar-1.15.90-permissions.patch
Log Message:
fix problem with unpacking archives in a directory for which
one has write permission but does not own (such as /tmp) (#149686)
tar-1.15.90-permissions.patch:
extract.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
--- NEW FILE tar-1.15.90-permissions.patch ---
--- tar-1.15.90/src/extract.c.permissions 2006-07-18 15:18:44.000000000 +0200
+++ tar-1.15.90/src/extract.c 2006-07-18 15:37:36.000000000 +0200
@@ -428,7 +428,7 @@
invert_permissions is zero, because
repair_delayed_set_stat may need to update the struct. */
delay_set_stat (file_name,
- ¤t_stat_info /* ignored */,
+ ¤t_stat_info,
invert_permissions, INTERDIR_PERMSTATUS);
print_for_mkdir (file_name, cursor - file_name, mode);
@@ -647,7 +647,7 @@
}
if (S_ISDIR (st.st_mode))
{
- mode = st.st_mode & ~ current_umask;
+ mode = st.st_mode;
break;
}
}
@@ -668,12 +668,16 @@
if (status == 0
|| old_files_option == DEFAULT_OLD_FILES
|| old_files_option == OVERWRITE_OLD_FILES)
- delay_set_stat (file_name, ¤t_stat_info,
- MODE_RWX & (mode ^ current_stat_info.stat.st_mode),
- (status == 0
- ? ARCHIVED_PERMSTATUS
- : UNKNOWN_PERMSTATUS));
-
+ {
+ if (status == 0)
+ delay_set_stat (file_name, ¤t_stat_info,
+ MODE_RWX & (mode ^ current_stat_info.stat.st_mode),
+ ARCHIVED_PERMSTATUS);
+ else /* For an already existing directory, invert_perms must be 0 */
+ delay_set_stat (file_name, ¤t_stat_info,
+ 0,
+ UNKNOWN_PERMSTATUS);
+ }
return status;
}
Index: tar.spec
===================================================================
RCS file: /cvs/dist/rpms/tar/devel/tar.spec,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- tar.spec 12 Jul 2006 08:25:34 -0000 1.39
+++ tar.spec 18 Jul 2006 14:34:14 -0000 1.40
@@ -1,7 +1,7 @@
Summary: A GNU file archiving program.
Name: tar
Version: 1.15.90
-Release: 3.1
+Release: 4
License: GPL
Group: Applications/Archiving
URL: http://www.gnu.org/software/tar/
@@ -12,6 +12,7 @@
Patch2: tar-1.14-loneZeroWarning.patch
Patch3: tar-1.15.1-vfatTruncate.patch
Patch4: tar-1.15.90-makeCheck.patch
+Patch5: tar-1.15.90-permissions.patch
Prereq: info
BuildRequires: autoconf automake gzip
@@ -35,7 +36,7 @@
%patch2 -p1 -b .loneZeroWarning
%patch3 -p1 -b .vfatTruncate
%patch4 -p1 -b .makeCheck
-
+%patch5 -p1 -b .permissions
%build
%ifos linux
@@ -105,6 +106,10 @@
%{_infodir}/tar.info*
%changelog
+* Tue Jul 18 2006 Peter Vrabec <pvrabec at redhat.com> 1.15.90-4
+- fix problem with unpacking archives in a directory for which
+ one has write permission but does not own (such as /tmp) (#149686)
+
* Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 1.15.90-3.1
- rebuild
More information about the fedora-cvs-commits
mailing list