Post

Replies

Boosts

Views

Activity

Reply to macOS 27/APFS: Supported ACL Absence Verification When acl_get_fd_np Returns ENOENT
Hi Kevin, Thanks again for the detailed explanations. We conducted further verification of native ACLs on macOS 26.5 (25F71), running on Apple silicon architecture and using the APFS file system, by employing isolated, synthetic test objects. Our testing covered scenarios involving the absence of ACLs, empty ACLs, and ACLs containing entries (including sets of 128 elements). We also performed entry enumeration and verified the consistency between the exported ACL representation and the entry iterator. The tests were successful in the configuration we examined, and your explanations helped us determine the correct interpretation of NULL/ENOENT values, while distinguishing them from other data retrieval errors. We are aware that these results confirm proper functionality within our specific test configuration and do not constitute a universal guarantee for all versions of macOS. Thank you for your help and your time!
Topic: App & System Services SubTopic: Core OS Tags:
6d
Reply to macOS 27/APFS: Supported ACL Absence Verification When acl_get_fd_np Returns ENOENT
Thanks, Kevin. That clears up the absence question for us. We’ll use acl_get_fd_np for the check and treat NULL with ENOENT on a valid FD and an empty ACL as equivalent. A bit of context on why I asked about read failures. I was looking at the error handling in statx1 in Apple’s public Libc source. In our tests on macOS 26.5 (build 25F71, arm64, APFS), acl_get_fd_np returned the expected entries for both the ALLOW and DENY cases. We haven’t observed a read failure that returned NULL with ENOENT. Do you happen to know whether that statx1 code is relevant to acl_get_fd_np on this build? If it’s easier to look at through Feedback Assistant, I’m happy to file a short report with the source reference and our results. One related question came up when we started inspecting ACLs that do have entries. If we keep the returned acl_t unchanged and walk it from ACL_FIRST_ENTRY, can we treat -1 with EINVAL from ACL_NEXT_ENTRY as the end of the list when we don’t know the entry count up front? The man page also lists EINVAL for invalid input. Is there a supported way to get the count first or otherwise confirm we’ve seen every entry? Apple’s acl_get_entry(3) man page: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/acl_get_entry.3.html. Thanks again for taking the time to explain this.
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to macOS 27/APFS: Supported ACL Absence Verification When acl_get_fd_np Returns ENOENT
Thanks, Kevin. On macOS 26.5 (build 25F71) with APFS, can we rely on acl_get_fd_np(fd, ACL_TYPE_EXTENDED) alone to establish that there are no ACL entries when it returns NULL with ENOENT, assuming a valid descriptor for the same existing object and errno cleared before the call and captured immediately afterward? Can a failure earlier in the ACL retrieval path produce the same NULL/ENOENT result? If so, what supported check would distinguish that failure from having no ACL entries?
Topic: App & System Services SubTopic: Core OS Tags:
2w
Reply to macOS 27/APFS: Supported ACL Absence Verification When acl_get_fd_np Returns ENOENT
Thank you, Kevin. Your explanation clarifies an important distinction. We do not need to distinguish a physically absent ACL record from a zero-entry ACL. For our check, those cases can be treated equivalently. Our requirement is to determine whether the object has any ACL entries. POSIX ownership, mode bits and other access controls remain separate checks. Our experiments established differences in API representation; they did not establish a difference in access-control behavior between absent and zero-entry ACLs. Once your check with the engineering team is complete, could you please clarify: For acl_get_fd_np(fd, ACL_TYPE_EXTENDED), may NULL with immediately captured errno == ENOENT be interpreted as “no ACL entries” when fd is valid and identifies the same existing object throughout the observation? Are there additional conditions or exceptions we should check? When fgetattrlist succeeds and returns a structurally valid response, requesting ATTR_CMN_RETURNED_ATTRS | ATTR_CMN_EXTENDED_SECURITY without FSOPT_PACK_INVAL_ATTRS, may omission of the extended-security returned bit be interpreted as no ACL entries, or are there other successful omission cases that must remain distinguishable? Does this guidance also apply to macOS 26.5 / build 25F71, used in our earlier tests, as well as macOS 27.0.1 / build 26A434 discussed here? We will continue to reject genuine retrieval errors and will not interpret default values of unreturned attributes as observed data. Thank you for checking this with engineering. ps. more info here: https://developer.apple.com/forums/thread/855333
Topic: App & System Services SubTopic: Core OS Tags:
2w
Reply to macOS 27/APFS: Supported ACL Absence Verification When acl_get_fd_np Returns ENOENT
Hi Kevin, Thanks again for the detailed explanations. We conducted further verification of native ACLs on macOS 26.5 (25F71), running on Apple silicon architecture and using the APFS file system, by employing isolated, synthetic test objects. Our testing covered scenarios involving the absence of ACLs, empty ACLs, and ACLs containing entries (including sets of 128 elements). We also performed entry enumeration and verified the consistency between the exported ACL representation and the entry iterator. The tests were successful in the configuration we examined, and your explanations helped us determine the correct interpretation of NULL/ENOENT values, while distinguishing them from other data retrieval errors. We are aware that these results confirm proper functionality within our specific test configuration and do not constitute a universal guarantee for all versions of macOS. Thank you for your help and your time!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
6d
Reply to macOS 27/APFS: Supported ACL Absence Verification When acl_get_fd_np Returns ENOENT
Thanks, Kevin. That clears up the absence question for us. We’ll use acl_get_fd_np for the check and treat NULL with ENOENT on a valid FD and an empty ACL as equivalent. A bit of context on why I asked about read failures. I was looking at the error handling in statx1 in Apple’s public Libc source. In our tests on macOS 26.5 (build 25F71, arm64, APFS), acl_get_fd_np returned the expected entries for both the ALLOW and DENY cases. We haven’t observed a read failure that returned NULL with ENOENT. Do you happen to know whether that statx1 code is relevant to acl_get_fd_np on this build? If it’s easier to look at through Feedback Assistant, I’m happy to file a short report with the source reference and our results. One related question came up when we started inspecting ACLs that do have entries. If we keep the returned acl_t unchanged and walk it from ACL_FIRST_ENTRY, can we treat -1 with EINVAL from ACL_NEXT_ENTRY as the end of the list when we don’t know the entry count up front? The man page also lists EINVAL for invalid input. Is there a supported way to get the count first or otherwise confirm we’ve seen every entry? Apple’s acl_get_entry(3) man page: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/acl_get_entry.3.html. Thanks again for taking the time to explain this.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
Reply to macOS 27/APFS: Supported ACL Absence Verification When acl_get_fd_np Returns ENOENT
Thanks, Kevin. On macOS 26.5 (build 25F71) with APFS, can we rely on acl_get_fd_np(fd, ACL_TYPE_EXTENDED) alone to establish that there are no ACL entries when it returns NULL with ENOENT, assuming a valid descriptor for the same existing object and errno cleared before the call and captured immediately afterward? Can a failure earlier in the ACL retrieval path produce the same NULL/ENOENT result? If so, what supported check would distinguish that failure from having no ACL entries?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
2w
Reply to macOS 27/APFS: Supported ACL Absence Verification When acl_get_fd_np Returns ENOENT
Thank you, Kevin. Your explanation clarifies an important distinction. We do not need to distinguish a physically absent ACL record from a zero-entry ACL. For our check, those cases can be treated equivalently. Our requirement is to determine whether the object has any ACL entries. POSIX ownership, mode bits and other access controls remain separate checks. Our experiments established differences in API representation; they did not establish a difference in access-control behavior between absent and zero-entry ACLs. Once your check with the engineering team is complete, could you please clarify: For acl_get_fd_np(fd, ACL_TYPE_EXTENDED), may NULL with immediately captured errno == ENOENT be interpreted as “no ACL entries” when fd is valid and identifies the same existing object throughout the observation? Are there additional conditions or exceptions we should check? When fgetattrlist succeeds and returns a structurally valid response, requesting ATTR_CMN_RETURNED_ATTRS | ATTR_CMN_EXTENDED_SECURITY without FSOPT_PACK_INVAL_ATTRS, may omission of the extended-security returned bit be interpreted as no ACL entries, or are there other successful omission cases that must remain distinguishable? Does this guidance also apply to macOS 26.5 / build 25F71, used in our earlier tests, as well as macOS 27.0.1 / build 26A434 discussed here? We will continue to reject genuine retrieval errors and will not interpret default values of unreturned attributes as observed data. Thank you for checking this with engineering. ps. more info here: https://developer.apple.com/forums/thread/855333
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
2w