forked from opencontainers/runc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a seccomp build tag and also support in the Makefile to add or remove build tags. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
- Loading branch information
1 parent
cd01b01
commit a8e0185
Showing
4 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// +build linux,cgo | ||
// +build linux,cgo,seccomp | ||
|
||
package seccomp | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
// +build !linux !cgo | ||
// +build !linux !cgo !seccomp | ||
|
||
package seccomp | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/opencontainers/runc/libcontainer/configs" | ||
) | ||
|
||
var ErrSeccompNotEnabled = errors.New("seccomp: config provided but seccomp not supported") | ||
|
||
// Seccomp not supported, do nothing | ||
func InitSeccomp(config *configs.Seccomp) error { | ||
if config != nil { | ||
return ErrSeccompNotEnabled | ||
} | ||
return nil | ||
} |