On 2022-12-30 01:18, Ondrej Valousek wrote:

* we no longer try to decode ACLs, instead we just copy the whole xattr with 
ACLs
making the code simpler and faster

What happens if you try to copy ACLs from a filesystem using NFSv4 ACLs to one using POSIXish ACLs, or vice versa?

* it pulls in dependency on libattr (so needs to be linked with -lattr, the 
automake
changes are not yet included in this patch), but on the other way, we could 
possibly ditch
dependency on libacl.

This would all have to be done, yes.


+#ifdef USE_XATTR
+  ret = chmod_or_fchmod (dst_name, dest_desc, mode);

Why is this call needed? Won't a successful attr_copy_file mean that the chmod_or_fchmod is unnecessary? I.e., can't we do the chmod_or_lchmod only if the attr_copy_file fails with a particular errno value that says "this file lacks extended attributes"?

+    ret = source_desc <= 0 && dest_desc <= 0
+      ? attr_copy_file (src_name, dst_name, copy_attr_permissions, NULL)
+      : attr_copy_fd (src_name, source_desc, dst_name, dest_desc, 
copy_attr_permissions, NULL);

When these functions fail, what are their errno values and should we treat any of them specially? (I can't easily find documentation for these functions.)


Reply via email to