bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ACL handling simplification + support for NFSv4


From: Paul Eggert
Subject: Re: [PATCH] ACL handling simplification + support for NFSv4
Date: Sat, 31 Dec 2022 01:00:02 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

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

[Prev in Thread] Current Thread [Next in Thread]