Skip to content
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

Merged
merged 4 commits into from
Sep 17, 2024

Commits on Sep 17, 2024

  1. Configuration menu
    Copy the full SHA
    03a3dbb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3d283f9 View commit details
    Browse the repository at this point in the history
  3. resolve_command: Use faccessat instead of custom permission check

    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)
    kit-ty-kate committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    0e74798 View commit details
    Browse the repository at this point in the history
  4. Move Windows stubs to opam-core

    As opam now routinely has stubs, eliminate the complicated dances for
    only linking stub libraries on Windows.
    dra27 authored and kit-ty-kate committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    1e79693 View commit details
    Browse the repository at this point in the history