2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 01:57:43 +00:00

Merge Add free profile

Basic AppArmor profile for the free binary, tested on Ubuntu 24.04.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1629
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Merged-by: Maxime Bélair <maxime.belair@canonical.com>
This commit is contained in:
Maxime Bélair 2025-06-23 14:11:07 +00:00
commit 83e9be1035
2 changed files with 26 additions and 0 deletions

20
profiles/apparmor.d/free Normal file
View File

@ -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 <abi/4.0>,
include <tunables/global>
profile free /usr/bin/free {
include <abstractions/base>
/usr/bin/free mr,
include if exists <local/free>
}

View File

@ -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\)'