Add DefaultContent API to retrieve apparmor profile content

The default apparmor profile is not stored on disk which causes
confusion when debugging the content of the profile. To solve this, we
now add an additional API which returns the profile as byte slice.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
Sascha Grunert
2019-07-18 10:01:45 +02:00
parent 7488ed6d9a
commit 27ebd7d6f0
3 changed files with 32 additions and 3 deletions

View File

@@ -24,3 +24,8 @@ func CheckProfileAndLoadDefault(name string) (string, error) {
}
return "", ErrApparmorUnsupported
}
// DefaultContent dummy.
func DefaultContent(name string) ([]byte, error) {
return nil, nil
}