Skip to content

Commit

Permalink
Do not try to save xattrs if not supported by the filesystem
Browse files Browse the repository at this point in the history
Closes #134
  • Loading branch information
marcosfrm committed Mar 18, 2023
1 parent 6a2e8bf commit c0c5e98
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/oper_save.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,14 @@ int createar_save_file(csavear *save, char *root, char *relpath, struct stat64 *
}

// ---- backup other file attributes (xattr + winattr)
if (createar_item_xattr(save, root, relpath, statbuf, dicoattr)!=0)
{ msgprintf(MSG_STACK, "backup_item_xattr() failed: cannot prepare xattr-dico for item %s\n", relpath);
attrerrors++;
// selinux can present fake xattrs
// do not try to save them if not supported by the filesystem, otherwise restoration will fail
if (filesys[save->fstype].support_for_xattr==true)
{
if (createar_item_xattr(save, root, relpath, statbuf, dicoattr)!=0)
{ msgprintf(MSG_STACK, "backup_item_xattr() failed: cannot prepare xattr-dico for item %s\n", relpath);
attrerrors++;
}
}

if (filesys[save->fstype].winattr==true)
Expand Down

0 comments on commit c0c5e98

Please sign in to comment.