diff --git a/pkg/aaparser/aaparser.go b/pkg/aaparser/aaparser.go index 57f577f75f..4eee2a1679 100644 --- a/pkg/aaparser/aaparser.go +++ b/pkg/aaparser/aaparser.go @@ -26,7 +26,7 @@ func GetVersion() (int, error) { // LoadProfile runs `apparmor_parser -r` on a specified apparmor profile to // replace the profile. func LoadProfile(profilePath string) error { - _, err := cmd("-r", filepath.Dir(profilePath)) + _, err := cmd("", "-r", filepath.Dir(profilePath)) if err != nil { return err } diff --git a/profiles/apparmor/apparmor.go b/profiles/apparmor/apparmor.go index 4b64590684..8859a41b40 100644 --- a/profiles/apparmor/apparmor.go +++ b/profiles/apparmor/apparmor.go @@ -66,8 +66,8 @@ func macroExists(m string) bool { return err == nil } -// InstallDefault generates a default profile and installs it in the -// ProfileDirectory with `apparmor_parser`. +// InstallDefault generates a default profile in a temp directory determined by +// os.TempDir(), then loads the profile into the kernel using 'apparmor_parser'. func InstallDefault(name string) error { p := profileData{ Name: name,