mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 10:07:12 +00:00
profiles: provide backwards compat for hwctl profile
The hwctl profile is being carried upstream, so we can keep it in sync, but is being packaged from the regular profile set so that it can be part of a package that is SRUed (ubuntu stable release update) separate from the rest of apparmor, and its profiles. Provide backwards compat with older parser to reduce the amount of distro patching that is needed. Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
d315f2b279
commit
df41185eb2
@ -12,7 +12,9 @@ abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
profile hwctl /usr/bin/hwctl {
|
||||
# provide backwards compat with older parsers that don't support @{exec_path}
|
||||
@{exec_path}=/usr/bin/hwctl
|
||||
profile hwctl @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/openssl>
|
||||
@ -38,10 +40,15 @@ profile hwctl /usr/bin/hwctl {
|
||||
/usr/bin/kmod cx,
|
||||
/etc/os-release r,
|
||||
|
||||
# note @{exec_path} not used for this attachment for backwards compat
|
||||
# reasons. Older parsers do not allow us to embed a variable declaration
|
||||
# to use the trick we are using above
|
||||
profile kmod /usr/bin/kmod {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} r,
|
||||
# old parsers do not support defining a variable outside of the
|
||||
# preamble for backward compat do not use @{exec_path} here
|
||||
/usr/bin/kmod r,
|
||||
@{PROC}/{cmdline,modules} r,
|
||||
@{sys}/module/** r, # for fetching kernel modules
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user