[star/f18] Fix for selinux patch

Pavel Raiskup praiskup at fedoraproject.org
Thu Oct 18 07:54:47 UTC 2012


commit 0454b3b0963570cd73133ff3405d321297fa5ef1
Author: Pavel Raiskup <praiskup at redhat.com>
Date:   Thu Oct 18 09:42:00 2012 +0200

    Fix for selinux patch
    
    - do not crash during extraction when only some files have set extended
      attributes (or SELinux context)
    
    Resolves: #861848

 star-1.5.1-selinux-segfault.patch |   13 +++++++++++++
 star.spec                         |   10 +++++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/star-1.5.1-selinux-segfault.patch b/star-1.5.1-selinux-segfault.patch
new file mode 100644
index 0000000..70e630d
--- /dev/null
+++ b/star-1.5.1-selinux-segfault.patch
@@ -0,0 +1,13 @@
+diff --git a/star/xattr.c b/star/xattr.c
+index 6493447..4034287 100644
+--- a/star/xattr.c
++++ b/star/xattr.c
+@@ -202,7 +202,7 @@ setselinux(info)
+        register FINFO *info;
+ {
+ #if defined(USE_XATTR) && defined(HAVE_SETXATTR) && defined(WITH_SELINUX)
+-       if (info->f_xattr) {
++       if (info->f_xflags & XF_XATTR) {
+                star_xattr_t    *xap;
+                for (xap = info->f_xattr; xap->name != NULL; xap++) {
+                  if (strcmp(xap->name, "security.selinux") == 0) {
diff --git a/star.spec b/star.spec
index 99ce12b..2861ece 100644
--- a/star.spec
+++ b/star.spec
@@ -4,7 +4,7 @@
 Summary:  An archiving tool with ACL support
 Name: star
 Version: 1.5.1
-Release: 9%{?dist}
+Release: 10%{?dist}
 URL: http://cdrecord.berlios.de/old/private/star.html
 Source: ftp://ftp.berlios.de/pub/star/%{name}-%{version}.tar.bz2
 
@@ -22,6 +22,8 @@ Patch5: star-1.5.1-bufferoverflow.patch
 Patch6: star-1.5.1-manpagereferences.patch
 #fix signedness segfault with multivol option(#666015)
 Patch7: star-1.5.1-multivolsigsegv.patch
+# do not crash when xattrs are not set on all files (#861848)
+Patch8: star-1.5.1-selinux-segfault.patch
 
 License: CDDL
 Group: Applications/Archiving
@@ -44,6 +46,7 @@ and can restore individual files from the archive. Star supports ACL.
 %patch5 -p1 -b .namesoverflow
 %patch6 -p1 -b .references
 %patch7 -p1 -b .multivol
+%patch8 -p1 -b .selinux-segfault
 cp -a star/all.mk star/Makefile
 iconv -f iso_8859-1 -t utf-8 AN-1.5 >AN-1.5_utf8
 mv AN-1.5_utf8 AN-1.5
@@ -64,6 +67,7 @@ export MAKEPROG=gmake
 (cd autoconf; AC_MACRODIR=. AWK=gawk ./autoconf)
 
 #make %{?_smp_mflags} PARCH=%{_target_cpu} CPPOPTX="-DNO_FSYNC" \
+# ~~> enable debug by COPTX='-g3 -O0' LDOPTX='-g3 -O0'
 make %{?_smp_mflags} PARCH=%{_target_cpu} \
 COPTX="$RPM_OPT_FLAGS -DTRY_EXT2_FS" CC="%{__cc}" \
 K_ARCH=%{_target_cpu} \
@@ -121,6 +125,10 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_mandir}/man4/star.4*
 
 %changelog
+* Thu Oct 18 2012 Pavel Raiskup <praiskup at redhat.com> - 1.5.1-10
+- do not crash during extracting if extended attributes are not set on all
+  archived files (#861848)
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list