feat(profiles): ensure bin, sbin compatibility for (u)mount.

This commit is contained in:
Alexandre Pujol 2022-06-12 22:56:27 +01:00
parent 779853dc7f
commit 24056c8cd1
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
5 changed files with 15 additions and 13 deletions

View File

@ -6,7 +6,7 @@ abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/mount
@{exec_path} = /{usr/,}{s,}bin/mount
profile mount @{exec_path} flags=(complain) {
include <abstractions/base>
include <abstractions/consoles>

View File

@ -1,12 +1,13 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2021 Mikhail Morfikov
# Copyright (C) 2020-2022 Mikhail Morfikov
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}sbin/mount.cifs
@{exec_path} = /{usr/,}{s,}bin/mount.cifs
profile mount-cifs @{exec_path} flags=(complain) {
include <abstractions/base>
include <abstractions/nameservice-strict>

View File

@ -1,12 +1,13 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# Copyright (C) 2019-2022 Mikhail Morfikov
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}sbin/mount.nfs
@{exec_path} = /{usr/,}{s,}bin/mount.nfs
profile mount-nfs @{exec_path} flags=(complain) {
include <abstractions/base>
include <abstractions/nameservice-strict>
@ -26,8 +27,8 @@ profile mount-nfs @{exec_path} flags=(complain) {
@{exec_path} mr,
/{usr/,}{s,}bin/start-statd rix,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}sbin/start-statd rix,
/{usr/,}bin/flock rix,
/usr/bin/systemctl rPx -> child-systemctl,

View File

@ -57,7 +57,7 @@ profile spectre-meltdown-checker @{exec_path} {
/{usr/,}bin/{,@{multiarch}-}objdump rix,
/{usr/,}{s,}bin/iucode_tool rix,
/{usr/,}bin/dmesg rix,
/{usr/,}bin/mount rix,
/{usr/,}{s,}bin/mount rix,
/{usr/,}bin/find rix,
/{usr/,}bin/xargs rix,
/{usr/,}bin/readlink rix,

View File

@ -7,7 +7,7 @@ abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/umount
@{exec_path} = /{usr/,}{s,}bin/umount
profile umount @{exec_path} flags=(complain) {
include <abstractions/base>
include <abstractions/consoles>
@ -26,8 +26,8 @@ profile umount @{exec_path} flags=(complain) {
@{exec_path} mr,
/{usr/,}sbin/umount.* rPx,
/{usr/,}sbin/mount.* rPx,
/{usr/,}{s,}bin/umount.* rPx,
/{usr/,}{s,}bin/mount.* rPx,
# Mount points
@{HOME}/ r,