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

Package fetch: add executable detection for Mach-O file headers #21555

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fabioarnold
Copy link
Sponsor Contributor

@fabioarnold fabioarnold commented Sep 30, 2024

When trying to execute a binary fetched from a package I ran into this issue: #21044:

the expected behavior from the package manager is to ignore permissions from the zip file and set the execute bit based on ELF header and shebang line alone (see #17463)

Since this has been implemented for ELF already this change adds support for Mach-O.

@owenbrooks
Copy link

Great! Would be good to add std.macho.FAT_MAGIC and std.macho.FAT_MAGIC_64 to support multi-architecture binaries too.

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.

2 participants