Problem: don't try to copy SMACK attribute, when none exist
Solution: return early if SMACK extended attributes do not exist or
if they are not supported
closes: #1711
closes: #13348
Signed-off-by: Christian Brabandt <cb@256bit.org>
if (from_file == NULL)
return;
+ size = listxattr((char *)from_file, NULL, 0);
+ // not supported or no attributes to copy
+ if (errno == ENOTSUP || size == 0)
+ return;
+
for (index = 0 ; index < (int)(sizeof(smack_copied_attributes)
/ sizeof(smack_copied_attributes)[0]) ; index++)
{
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2034,
/**/
2033,
/**/