diff --git a/profiles/apparmor.d/free b/profiles/apparmor.d/free new file mode 100644 index 000000000..19b200e40 --- /dev/null +++ b/profiles/apparmor.d/free @@ -0,0 +1,20 @@ +#------------------------------------------------------------------ +# Copyright (C) 2025 Canonical Ltd. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public +# License published by the Free Software Foundation. +#------------------------------------------------------------------ +# vim: ft=apparmor +# + +abi , +include + +profile free /usr/bin/free { + include + + /usr/bin/free mr, + + include if exists +} diff --git a/tests/profiles/free/task.yaml b/tests/profiles/free/task.yaml new file mode 100644 index 000000000..61a052a1e --- /dev/null +++ b/tests/profiles/free/task.yaml @@ -0,0 +1,6 @@ +summary: smoke test for the free profile +execute: | + # free works (this is a very basic test). + free + # The profile is attached based on the program path. + "$SPREAD_PATH"/tests/bin/actual-profile-of free | MATCH 'free \(enforce\)'