rpms/tar/devel tar-1.19-xattrs.patch,1.1,1.2 tar.spec,1.67,1.68

Radek Brich (rbrich) fedora-extras-commits at redhat.com
Wed Feb 13 09:10:22 UTC 2008


Author: rbrich

Update of /cvs/extras/rpms/tar/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31509

Modified Files:
	tar-1.19-xattrs.patch tar.spec 
Log Message:
Related: 431879

tar-1.19-xattrs.patch:

Index: tar-1.19-xattrs.patch
===================================================================
RCS file: /cvs/extras/rpms/tar/devel/tar-1.19-xattrs.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tar-1.19-xattrs.patch	17 Dec 2007 11:14:16 -0000	1.1
+++ tar-1.19-xattrs.patch	13 Feb 2008 09:10:03 -0000	1.2
@@ -231,6 +231,7 @@
 +{ /* "system.posix_acl_access" */
 +#ifdef HAVE_LIBACL
 +  char *val = NULL;
++  size_t len;
 +  acl_t acl;
 +
 +  if (fd != -1)
@@ -250,7 +251,7 @@
 +  }
 +  
 +  
-+  val = acl_to_text(acl, NULL);
++  val = acl_to_text(acl, &len);
 +  acl_free (acl);
 +  
 +  if (val == NULL)
@@ -259,8 +260,8 @@
 +    return;
 +  }
 +  
-+  *ret_ptr = xstrdup (val);
-+  *ret_len = strlen (val);
++  *ret_ptr = xstrndup (val, len);
++  *ret_len = len;
 +  
 +  acl_free (val);
 +#endif
@@ -272,6 +273,7 @@
 +{ /* "system.posix_acl_default" */
 +#ifdef HAVE_LIBACL
 +  char *val = NULL;
++  size_t len;
 +  acl_t acl;
 +  
 +  if ((acl = acl_get_file (file_name, ACL_TYPE_DEFAULT)) == (acl_t)NULL)
@@ -281,7 +283,7 @@
 +    return;
 +  }
 +  
-+  val = acl_to_text(acl, NULL);
++  val = acl_to_text(acl, &len);
 +  acl_free (acl);
 +  
 +  if (val == NULL)
@@ -290,8 +292,8 @@
 +    return;
 +  }
 +  
-+  *ret_ptr = xstrdup (val);
-+  *ret_len = strlen (val);
++  *ret_ptr = xstrndup (val, len);
++  *ret_len = len;
 +  
 +  acl_free (val);
 +#endif
@@ -328,10 +330,10 @@
 +#else
 +    if (fd == -1)
 +    {
-+      if (lgetfilecon (file_name, &st->cntx_name) == -1)
++      if ((lgetfilecon (file_name, &st->cntx_name) == -1) && (errno != ENOTSUP) && (errno != ENODATA))
 +        call_arg_warn ("lgetfilecon", file_name);
 +    }
-+    else if (fgetfilecon (fd, &st->cntx_name) == -1)
++    else if ((fgetfilecon (fd, &st->cntx_name) == -1) && (errno != ENOTSUP) && (errno != ENODATA))
 +      call_arg_warn ("fgetfilecon", file_name);
 +#endif
 +  }
@@ -427,9 +429,8 @@
 +          ret = lsetxattr (file_name, attr, ptr, len, 0);
 +        }
 +
-+      if ((ret == -1) && (errno == EPERM))
-+        call_arg_warn(sysname, file_name);
-+      else if ((ret == -1) && (errno != EOPNOTSUPP))
++      /* do not print warnings when SELinux is disabled */
++      if ((ret == -1) && (errno != EPERM) && (errno != ENOTSUP))
 +        call_arg_error(sysname, file_name);
 +    }
 +#endif


Index: tar.spec
===================================================================
RCS file: /cvs/extras/rpms/tar/devel/tar.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- tar.spec	21 Jan 2008 11:56:54 -0000	1.67
+++ tar.spec	13 Feb 2008 09:10:03 -0000	1.68
@@ -2,7 +2,7 @@
 Name: tar
 Epoch: 2
 Version: 1.19
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv3+
 Group: Applications/Archiving
 URL: http://www.gnu.org/software/tar/
@@ -90,6 +90,10 @@
 %{_infodir}/tar.info*
 
 %changelog
+* Tue Feb 12 2008 Radek Brich <rbrich at redhat.com> 2:1.19-3
+- do not print getfilecon/setfilecon warnings when SELinux is disabled
+  or SELinux data are not available (bz#431879)
+
 * Mon Jan 21 2008 Radek Brich <rbrich at redhat.com> 2:1.19-2
 - fix errors in man page
   * fix definition of --occurrence (bz#416661, patch by Jonathan Wakely)




More information about the fedora-extras-commits mailing list