star/star-1.5.1-selinux-segfault.patch
Pavel Raiskup 3c14d841f3 Fix for selinux patch
- do not crash during extraction when only some files have set extended
  attributes (or SELinux context)

Resolves: #861848
2012-10-18 09:44:57 +02:00

14 lines
500 B
Diff

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) {