mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
fix: Landlock probe environment and autofallback to BW
This commit is contained in:
@@ -33,13 +33,17 @@ type landlockSandbox struct {
|
||||
}
|
||||
|
||||
// newLandlockSandbox creates a new Landlock sandbox instance after verifying
|
||||
// that both Landlock and seccomp user notification are available on the system.
|
||||
// that Landlock and the no-NNP seccomp shim path are available on the system.
|
||||
func newLandlockSandbox() (sandbox.Sandbox, error) {
|
||||
abi, err := landlockDetectABI()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("landlock not available: %w", err)
|
||||
}
|
||||
|
||||
if err := landlockShimProbe(); err != nil {
|
||||
return nil, fmt.Errorf("landlock shim not available: %w", err)
|
||||
}
|
||||
|
||||
log.Debugf("Landlock ABI V%d detected (Refer=%v, Truncate=%v, Network=%v, IoctlDev=%v, Scoping=%v)",
|
||||
abi.Version, abi.HasRefer, abi.HasTruncate, abi.HasNetwork, abi.HasIoctlDev, abi.HasScoping)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user