Properly handle "builtin" seccomp profile

Like in CLI [1] the "builtin" seccomp profile should be handled the same
as "unconfined".

[1] f4a68da195/cli/command/container/opts.go (L929)

Signed-off-by: Rafael Buchbinder <rafi@rbk.io>
This commit is contained in:
Rafael Buchbinder 2025-01-17 13:11:28 +02:00 committed by Guillaume Lours
parent bd2b49a1cf
commit 52578c0998

View File

@ -486,7 +486,7 @@ func parseSecurityOpts(p *types.Project, securityOpts []string) ([]string, bool,
return securityOpts, false, fmt.Errorf("Invalid security-opt: %q", opt)
}
}
if con[0] == "seccomp" && con[1] != "unconfined" {
if con[0] == "seccomp" && con[1] != "unconfined" && con[1] != "builtin" {
f, err := os.ReadFile(p.RelativePath(con[1]))
if err != nil {
return securityOpts, false, fmt.Errorf("opening seccomp profile (%s) failed: %w", con[1], err)