Skip to content

Commit 04381bb

Browse files
committed
Add DYLD environment variables entitlement for macOS
macOS strips DYLD_LIBRARY_PATH from hardened runtime processes. The runner binary requires the hypervisor entitlement, which enables hardened runtime, causing macOS to silently strip DYLD_LIBRARY_PATH before the process starts. This prevents libkrun from finding libkrunfw.dylib when it lives in a separate firmware directory. Add `com.apple.security.cs.allow-dyld-environment-variables` to the runner entitlements so DYLD_LIBRARY_PATH passes through. Verify with: task build-dev-darwin codesign -d --entitlements - bin/propolis-runner Expected output includes: ``` [Key] com.apple.security.cs.allow-dyld-environment-variables [Value] [Bool] true ``` I was able to boot an image with this patch: ``` DYLD_LIBRARY_PATH=/opt/homebrew/lib bin/propolis-runner "$(cat /tmp/propolis-test.json)" [2026-03-05T11:04:22Z DEBUG vmm::macos::vstate] Guest memory host_addr=0x300000000 guest_addr=80000000 len=80000000 [2026-03-05T11:04:22Z DEBUG vmm::macos::vstate] Guest memory host_addr=0x380000000 guest_addr=140000000 len=20000000 [2026-03-05T11:04:22Z DEBUG utils::macos::epoll] EpollEvent new: 4 [2026-03-05T11:04:22Z DEBUG utils::macos::epoll] EpollEvent data: 4 [2026-03-05T11:04:22Z DEBUG utils::macos::epoll] add fd in: 4 [2026-03-05T11:04:22Z DEBUG devices::legacy::aarch64::gpio] SET_IRQ_LINE (GPIO)=33 ```
1 parent c003ed5 commit 04381bb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

assets/entitlements.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
<true/>
77
<key>com.apple.security.cs.disable-library-validation</key>
88
<true/>
9+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
10+
<true/>
911
</dict>
1012
</plist>

0 commit comments

Comments
 (0)