feat(profiles): add modprobed-db.

This commit is contained in:
Alexandre Pujol 2022-10-06 20:45:31 +01:00
parent c2952b1ec5
commit 1c97feb5c2
Failed to generate hash of commit

View file

@ -0,0 +1,45 @@
# apparmor.d - Full set of apparmor profiles
# 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/,}bin/modprobed-db
profile modprobed-db @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
@{exec_path} mr,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/cat rix,
/{usr/,}bin/cp rix,
/{usr/,}bin/cut rix,
/{usr/,}bin/gawk rix,
/{usr/,}bin/getent rix,
/{usr/,}bin/grep rix,
/{usr/,}bin/logname rix,
/{usr/,}bin/md5sum rix,
/{usr/,}bin/rm rix,
/{usr/,}bin/sed rix,
/{usr/,}bin/sort rix,
/{usr/,}bin/uniq rix,
/{usr/,}bin/wc rix,
/usr/share/terminfo/x/xterm-256color r,
owner @{user_config_dirs}/modprobed-db.conf r,
owner @{user_config_dirs}/modprobed.db rw,
owner /tmp/.inmem rw,
owner /tmp/.potential_new_db rw,
@{PROC}/modules r,
owner @{PROC}/@{pid}/loginuid r,
/dev/tty rw,
include if exists <local/modprobed-db>
}