Some fixes.

This commit is contained in:
Alexandre Pujol 2021-04-21 21:57:17 +01:00
parent a49e221949
commit 749859920e
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
4 changed files with 18 additions and 7 deletions

View File

@ -9,8 +9,8 @@ include <tunables/global>
@{exec_path} = /{usr/,}bin/aa-notify
profile aa-notify @{exec_path} {
include <abstractions/base>
include <abstractions/python>
include <abstractions/nameservice-strict>
include <abstractions/python>
capability sys_ptrace,
@ -18,6 +18,8 @@ profile aa-notify @{exec_path} {
@{exec_path} mr,
/{usr/,}/bin/ r,
/etc/apparmor/*.conf r,
/etc/inputrc r,

View File

@ -1,5 +1,6 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
@ -11,6 +12,11 @@ profile dkms @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
capability dac_read_search,
capability mknod,
capability setgid,
capability setuid,
@{exec_path} r,
/{usr/,}bin/{,ba,da}sh rix,
@ -48,15 +54,14 @@ profile dkms @{exec_path} {
/{usr/,}bin/lsb_release rPx -> child-lsb_release,
/{usr/,}lib/linux-kbuild-*/scripts/** rix,
capability setuid,
capability setgid,
/proc/sys/kernel/osrelease r,
/{usr/,}lib/modules/*/build/scripts/** rix,
/{usr/,}lib/linux-kbuild-*/tools/objtool/objtool rix,
/ r,
/{usr/,}lib/modules/*/updates/ rw,
/{usr/,}lib/modules/*/updates/dkms/ rw,
/{usr/,}lib/modules/*/updates/dkms/*.ko rw,
/{usr/,}lib/modules/*/kernel/drivers/{,**.ko.xz} rw,
/var/lib/dkms/ r,
/var/lib/dkms/** rw,
@ -84,7 +89,7 @@ profile dkms @{exec_path} {
owner /tmp/* rw,
owner @{PROC}/@{pid}/fd/ r,
@{PROC}/sys/kernel/osrelease r,
profile kmod {
include <abstractions/base>

View File

@ -16,6 +16,7 @@ profile polkit-agent-helper @{exec_path} {
include <abstractions/deny-root-dir-access>
signal (receive) set=(term, kill) peer=polkit-*-authentication-agent,
signal (receive) set=(term, kill) peer=gnome-shell,
signal (receive) set=(term, kill) peer=pkexec,
capability setgid,

View File

@ -27,7 +27,6 @@ profile virt-manager @{exec_path} {
include <abstractions/python>
include <abstractions/devices-usb>
include <abstractions/gstreamer>
include <abstractions/deny-dconf>
network inet stream,
network inet6 stream,
@ -91,7 +90,11 @@ profile virt-manager @{exec_path} {
/var/lib/dbus/machine-id r,
/etc/machine-id r,
# Silecne the noise
include <abstractions/dconf>
owner @{run}/user/@{uid}/dconf/ rw,
owner @{run}/user/@{uid}/dconf/user rw,
# Silence the noise
deny /usr/share/virt-manager/{,**} w,
include if exists <local/virt-manager>