1.9 KiB
1.9 KiB
Pre12 Batch 03: POSIX ACL mode helper
Change
- In
src/xattr.c,erofs_acl_from_modenow obtains the owner, group, and other permissions withacl_posix1e_mode_to_perm. - The helper tags are
ACL_USER_OBJ,ACL_GROUP_OBJ, andACL_OTHER, matching the adjacentae_tagassignments. - No other function lines, ACL entry ordering,
acl_cnt, IDs, default ACL handling, fallback behavior, flags, errno behavior, or control flow changed.
Helper confirmation
- The local FreeBSD header
sys/sys/acl.hdeclaresacl_posix1e_mode_to_perm(acl_tag_t tag, mode_t mode)for kernel consumers. - The local FreeBSD implementation in
sys/kern/subr_acl_posix1e.cmapsACL_USER_OBJfromS_IRWXU,ACL_GROUP_OBJfromS_IRWXG, andACL_OTHERfromS_IRWXO, returning the corresponding POSIX ACL read, write, and execute permission bits. src/xattr.calready includes<sys/acl.h>; no include change was needed.
Exhaustive equivalence
A temporary standalone C program reproduced the local FreeBSD helper logic and
compared it with the three replaced expressions for every permission mode from
0000 through 0777:
equivalent=1536/1536 modes=512 tags=3 mismatches=0
temporary_cleanup=ok
This covers 512 modes for each of the three tags. The temporary source and executable were deleted and are not part of the repository.
Static validation
- The
erofs_acl_from_modefunction is line-for-line unchanged except for the threeae_permexpressions. - The source diff changes only those three expressions; this document is the only added file.
git diff --checkandgit diff --cached --checkcompleted without errors.- Before commit, both unstaged status and staged status contained only
src/xattr.canddocs/pre12-batch-03.mdunderrepo-pre-12.
Tests not run
Per the Batch 03 execution constraints, no project build, QEMU run, smoke test, or feature test was run.