You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mirror the Protection opt-out from #71 (allow_degraded / disable per
Landlock protection) in the Go SDK, matching the Python surface so a Go
sandbox can run below the default ABI v6 floor by degrading or disabling
the v6-only protections.
- Protection type with the six C-ABI discriminants (FS_REFER..ABSTRACT_UNIX_SOCKET_SCOPE).
- AllowDegraded / Disable Sandbox fields, wired through the builder
(Disable applied last, so it wins when a protection is in both).
- ProtectionMinABI exposes sandlock_protection_min_abi for capability checks.
Tests: TestProtectionMinABI pins the discriminants against the live FFI
(a wrong value would resolve elsewhere and fail); TestRunDegradedBelowV6
confines and runs a fully-degradable policy end to end, with a negative
control asserting the default strict policy fails below v6 so the
degraded success is attributable to the opt-out.
Closes#108
t.Fatalf("default strict policy unexpectedly succeeded on Landlock ABI v%d (< v6); the degraded assertion would prove nothing", sandlock.LandlockABIVersion())
0 commit comments