On macOS 26.5.2 (build 25F84), which documented API and return conditions, if any, establish that a regular file on APFS has no extended access control list (ACL), using an already-open file descriptor?
We tested three disposable regular files on an APFS volume reporting ACL support.
For each file, we opened a read-only file descriptor and called:
acl_get_fd_np(fd, ACL_TYPE_EXTENDED)
fgetattrlist() requesting ATTR_CMN_RETURNED_ATTRS | ATTR_CMN_EXTENDED_SECURITY
Before and after inspection, fstat() confirmed stable device, inode, mode, and change timestamp.
Observed results:
1. Newly created file, no ACL explicitly assigned
acl_get_fd_np() returned NULL with errno == ENOENT.
fgetattrlist() succeeded but omitted ATTR_CMN_EXTENDED_SECURITY from the returned attribute mask.
FSOPT_PACK_INVAL_ATTRS also left that bit clear.
2. File with an explicitly assigned empty ACL
acl_get_fd_np() returned NULL with errno == ENOENT.
fgetattrlist() returned the extended-security attribute with an ACL entry count of zero.
3. File with one explicit ACL entry
acl_get_fd_np() returned a non-null ACL.
fgetattrlist() returned the extended-security attribute with an ACL entry count of one.
Apple's published XNU attribute-packing implementation appears to use the same omission branch when ACL metadata is unsupported or when the ACL pointer is null.
My question:
Is there a supported descriptor-based API sequence that reliably distinguishes:
Genuine absence of an extended ACL
Unavailable or unsupported per-file ACL metadata
An ACL retrieval failure
If so, which API, capability checks, return values, attribute bits, or error conditions should a caller rely on?
Are there relevant APFS or macOS version limitations?
If the public API cannot establish ACL absence unambiguously in this situation, confirmation of that limitation would also be helpful.
Thank you for your guidance.
0
0
15