Skip to content

Commit

Permalink
Merge pull request #135 from marcosfrm/xattrs1
Browse files Browse the repository at this point in the history
Do not try to save xattrs if not supported by the filesystem
  • Loading branch information
fdupoux authored Mar 18, 2023
2 parents 6a2e8bf + c0c5e98 commit f7bfe34
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 f7bfe34

Please sign in to comment.