-
Notifications
You must be signed in to change notification settings - Fork 359
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
Fix opam unable to find executables on systems where users belong to more than 32 groups when opam is built using musl libc #5381
Conversation
f04ced9
to
8ef4544
Compare
I think there's a couple of bits in We should double-check that |
8ef4544
to
8423043
Compare
8423043
to
25bb044
Compare
Annoying, |
Discussed today: we decided we're not worried about requiring stubs in opam-core for all platforms, so wrapping |
2d6126b
to
1f6ebf2
Compare
25f8b6c
to
d26ffce
Compare
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.
Some format remarks : commits to squash, etc.
Also, commit messages are not very explicit, an update with more information could help.
914e529
to
b7cf247
Compare
squashed |
b7cf247
to
883908a
Compare
883908a
to
f180373
Compare
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.
Does doc/index.html
need to be updated by the last commit (or others) ?
done. Feel free to squash if you're fine with the two last fixup commits |
Unix.access uses RUID and RGID, which is not correct when doing a PATH-search. The faccessat function is able to check permissions using EUID and EGID instead. opam's hand-rolled check_permissions function is therefore replaced with a binding for faccessat. This simultaneously fixes two other things: - Platforms (such as Cygwin) which use ACLs no longer need special support, because their implementations of faccessat already take ACLs into account - We no longer use Unix.getgroups which means that we work around a problem with binaries built using musl libc and then used on systems where a user belongs to more than 32 groups (cf. https://www.openwall.com/lists/musl/2021/07/03/1)
As opam now routinely has stubs, eliminate the complicated dances for only linking stub libraries on Windows.
047f689
to
1e79693
Compare
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.
Thanks!
…more than 32 groups Following the merge of ocaml#5381 this workaround is no longer needed
Details of the issue in musl described in https://www.openwall.com/lists/musl/2021/07/03/1
Fixes #5373