Skip to content

Conversation

@jefft
Copy link

@jefft jefft commented Nov 5, 2025

Fixes #8960 and #9147. Delegate to libc euidaccess to avoid bugs (#9147) and respect ACLs (#8960).

Note, the tests are independent commits that can be applied first, where they should fail before the 'fix' commit is applied. Run the tests with:

cargo test --test tests test_permission_with_acl
cargo test --test tests test_permission_with_supplementary_group

Warning: code is partly Claude-generated as I'm not that familiar with Rust.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 5, 2025

Merging this PR will degrade performance by 27.39%

❌ 8 regressed benchmarks
✅ 274 untouched benchmarks
⏩ 38 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory sort_long_line[160000] 712.6 KB 981.4 KB -27.39%
Memory sort_accented_data[500000] 22.1 MB 28.3 MB -21.79%
Memory sort_mixed_data[500000] 22.9 MB 27.1 MB -15.71%
Memory sort_key_field[500000] 47.8 MB 51.8 MB -7.62%
Memory sort_unique_locale[500000] 33.6 MB 39.8 MB -15.51%
Memory sort_numeric[500000] 75.5 MB 79.2 MB -4.66%
Memory sort_ascii_only[500000] 22.2 MB 28.3 MB -21.77%
Memory du_wide_tree[(5000, 500)] 1.2 MB 1.3 MB -3.86%

Comparing jefft:fix/8960-9147-test-work-with-acls-and-supplementary-groups (09b1211) with main (a1545ef)

Open in CodSpeed

Footnotes

  1. 38 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)

Copy link
Contributor

@sylvestre sylvestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dunno if you saw it but many jobs are failing, this is why it hasn't been reviewed yet

@jefft jefft force-pushed the fix/8960-9147-test-work-with-acls-and-supplementary-groups branch from d56a7d6 to e06edcb Compare December 28, 2025 04:53
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
Note: The gnu test tests/csplit/csplit-io-err was skipped on 'main' but is now failing.

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tail/assert is no longer failing!

@jefft jefft force-pushed the fix/8960-9147-test-work-with-acls-and-supplementary-groups branch 2 times, most recently from a7881d7 to dc664b3 Compare December 29, 2025 12:20
@jefft jefft marked this pull request as draft December 30, 2025 07:31
@jefft jefft force-pushed the fix/8960-9147-test-work-with-acls-and-supplementary-groups branch from 80f419d to 24c7c88 Compare January 17, 2026 04:14
jefft added 5 commits January 17, 2026 15:34
…ls#9147

Run with:

cargo test --test tests test_permission_with_supplementary_group
Run with:

cargo test --test tests test_permission_with_acl
Replace manual permission checking logic with platform-specific libc functions that properly handle supplementary groups and ACLs:

- Linux, Hurd, Redox, Cygwin, Solaris, Illumos: euidaccess()
- FreeBSD: eaccess()
- macOS, iOS, NetBSD, OpenBSD, DragonFly: faccessat() with AT_EACCESS
- Android: faccessat()
- Other OSes: fall back to libc:access()

These functions delegate permission checks to the kernel, which correctly evaluates all of the user's group memberships (both primary and supplementary), as well as ACLs and other advanced permission features.

Fixes uutils#8960
Fixes uutils#9147
@jefft jefft force-pushed the fix/8960-9147-test-work-with-acls-and-supplementary-groups branch from 24c7c88 to 72aa2ee Compare January 17, 2026 04:57
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)

@jefft jefft force-pushed the fix/8960-9147-test-work-with-acls-and-supplementary-groups branch from 72aa2ee to 09b1211 Compare January 17, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The test command does not work properly

2 participants