-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Get 'test' working properly with acls and supplementary groups #9149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Get 'test' working properly with acls and supplementary groups #9149
Conversation
Merging this PR will degrade performance by 27.39%
Performance Changes
Comparing Footnotes
|
|
GNU testsuite comparison: |
sylvestre
left a comment
There was a problem hiding this 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
d56a7d6 to
e06edcb
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
a7881d7 to
dc664b3
Compare
80f419d to
24c7c88
Compare
…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
24c7c88 to
72aa2ee
Compare
|
GNU testsuite comparison: |
72aa2ee to
09b1211
Compare
Fixes #8960 and #9147. Delegate to libc
euidaccessto 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:
Warning: code is partly Claude-generated as I'm not that familiar with Rust.