From 6fbe5efada99efe134c9ca5c35210463551a3b30 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 26 Aug 2024 16:14:57 +0200 Subject: [PATCH] spoc: only include abstract policy in recorded apparmor profiles this unbreaks spoc-based workflows, refs #2388 --- internal/pkg/cli/recorder/recorder.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/internal/pkg/cli/recorder/recorder.go b/internal/pkg/cli/recorder/recorder.go index 153d023cea..eeb7e5d409 100644 --- a/internal/pkg/cli/recorder/recorder.go +++ b/internal/pkg/cli/recorder/recorder.go @@ -401,16 +401,6 @@ func (r *Recorder) buildProfileCRD(writer io.Writer, spec *seccompprofileapi.Sec } func (r *Recorder) buildAppArmorProfileCRD(writer io.Writer, spec *apparmorprofileapi.AppArmorProfileSpec) error { - programName, err := filepath.Abs(r.options.commandOptions.Command()) - if err != nil { - return fmt.Errorf("get program name: %w", err) - } - // Raw apparmor profile is expected in the required policy field. - policy, err := crd2armor.GenerateProfile(programName, &spec.Abstract) - if err != nil { - return fmt.Errorf("generating raw apparmor profile: %w", err) - } - spec.Policy = policy profile := &apparmorprofileapi.AppArmorProfile{ TypeMeta: metav1.TypeMeta{ Kind: "AppArmorProfile",