Skip to content

Commit

Permalink
Merge pull request cri-o#8686 from michalsieron/reallow-build-without…
Browse files Browse the repository at this point in the history
…-seccomp

Re-allow building without seccomp installed
  • Loading branch information
openshift-merge-bot[bot] authored Oct 17, 2024
2 parents 7049bb9 + a271b4a commit 24d68f5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions internal/config/seccomp/notifier.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build linux && cgo
// +build linux,cgo
//go:build seccomp && linux && cgo
// +build seccomp,linux,cgo

package seccomp

Expand Down
4 changes: 2 additions & 2 deletions internal/config/seccomp/seccomp.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build linux && cgo
// +build linux,cgo
//go:build seccomp && linux && cgo
// +build seccomp,linux,cgo

package seccomp

Expand Down
17 changes: 8 additions & 9 deletions internal/config/seccomp/seccomp_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !(linux && cgo)
// +build !linux !cgo
//go:build !(seccomp && linux && cgo)
// +build !seccomp !linux !cgo

package seccomp

Expand All @@ -12,20 +12,18 @@ import (
types "k8s.io/cri-api/pkg/apis/runtime/v1"
)

// Config is the global seccomp configuration type
// Config is the global seccomp configuration type.
type Config struct {
enabled bool
}

// Notifier wraps a seccomp notifier instance for a container.
type Notifier struct {
}
type Notifier struct{}

// Notification is a seccomp notification which gets sent to the CRI-O server.
type Notification struct {
}
type Notification struct{}

// New creates a new default seccomp configuration instance
// New creates a new default seccomp configuration instance.
func New() *Config {
return &Config{
enabled: false,
Expand Down Expand Up @@ -110,10 +108,11 @@ func (c *Config) IsDisabled() bool {
return true
}

// Profile returns the currently loaded seccomp profile
// Profile returns the currently loaded seccomp profile.
func (c *Config) Profile() *seccomp.Seccomp {
return nil
}

func DefaultProfile() *seccomp.Seccomp {
return nil
}

0 comments on commit 24d68f5

Please sign in to comment.