mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-11-04 14:49:53 +08:00
26 lines
463 B
Go
26 lines
463 B
Go
package libseccomp
|
|
|
|
// Action is seccomp trap action
|
|
type Action uint32
|
|
|
|
// Action defines seccomp action to the syscall
|
|
// default value 0 is invalid
|
|
const (
|
|
ActionAllow Action = iota + 1
|
|
ActionErrno
|
|
ActionTrace
|
|
ActionKill
|
|
)
|
|
|
|
// MsgDisallow, Msghandle defines the action needed when trapped by
|
|
// seccomp filter
|
|
const (
|
|
MsgDisallow int16 = iota + 1
|
|
MsgHandle
|
|
)
|
|
|
|
// Action get the basic action
|
|
func (a Action) Action() Action {
|
|
return Action(a & 0xffff)
|
|
}
|