// ParseDefaultActionForce simply sets the default action of the seccomp configuration func ParseDefaultActionForce(action string, config *rspec.Seccomp) error { if action == "" { return nil } defaultAction, err := parseAction(action) if err != nil { return err } config.DefaultAction = defaultAction return nil }
// ParseDefaultAction sets the default action of the seccomp configuration // and then removes any rules that were already specified with this action func ParseDefaultAction(action string, config *rspec.Seccomp) error { if action == "" { return nil } defaultAction, err := parseAction(action) if err != nil { return err } config.DefaultAction = defaultAction err = RemoveAllMatchingRules(config, action) if err != nil { return err } return nil }