mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-29 22:35:15 +01:00
update apparmor profiles
This commit is contained in:
parent
f5d1386f74
commit
5faf590bf5
16 changed files with 131 additions and 4 deletions
|
@ -75,4 +75,4 @@
|
|||
owner /{media,mnt}/*/*/.Trash-[0-9]*/expunged/[0-9]*/ rw,
|
||||
owner /{media,mnt}/*/*/.Trash-[0-9]*/expunged/[0-9]*/** rw,
|
||||
|
||||
include if exists <abstractions/trash.d>
|
||||
include if exists <abstractions/trash.d>
|
||||
|
|
|
@ -81,6 +81,7 @@ profile discord @{exec_path} {
|
|||
owner @{PROC}/@{pid}/fd/ r,
|
||||
deny @{PROC}/vmstat r,
|
||||
deny owner @{PROC}/@{pid}/oom_{,score_}adj rw,
|
||||
owner @{PROC}/@{pids}/clear_refs w,
|
||||
owner @{PROC}/@{pids}/task/ r,
|
||||
@{PROC}/@{pids}/task/@{tid}/status r,
|
||||
deny @{PROC}/@{pids}/stat r,
|
||||
|
|
|
@ -9,6 +9,7 @@ include <tunables/global>
|
|||
@{exec_path} = /{usr/,}bin/dpkg-architecture
|
||||
profile dpkg-architecture @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/perl>
|
||||
|
||||
@{exec_path} r,
|
||||
|
|
|
@ -84,6 +84,7 @@ profile cron @{exec_path} {
|
|||
/etc/cron.{hourly,daily,weekly,monthly}/logrotate rPx,
|
||||
/etc/cron.{hourly,daily,weekly,monthly}/mlocate rPx,
|
||||
/etc/cron.{hourly,daily,weekly,monthly}/dlocate rPx,
|
||||
/etc/cron.{hourly,daily,weekly,monthly}/plocate rPx,
|
||||
/etc/cron.{hourly,daily,weekly,monthly}/passwd rPUx,
|
||||
/etc/cron.{hourly,daily,weekly,monthly}/apt-compat rPx,
|
||||
/etc/cron.{hourly,daily,weekly,monthly}/aptitude rPx,
|
||||
|
|
30
apparmor.d/groups/cron/cron-plocate
Normal file
30
apparmor.d/groups/cron/cron-plocate
Normal file
|
@ -0,0 +1,30 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021 Mikhail Morfikov
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /etc/cron.{hourly,daily,weekly,monthly}/plocate
|
||||
profile cron-plocate @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
|
||||
@{exec_path} r,
|
||||
/{usr/,}bin/{,ba,da}sh rix,
|
||||
|
||||
/{usr/,}bin/which rix,
|
||||
/{usr/,}bin/true rix,
|
||||
/{usr/,}bin/flock rix,
|
||||
/{usr/,}bin/nocache rix,
|
||||
/{usr/,}bin/ionice rix,
|
||||
/{usr/,}bin/nice rix,
|
||||
|
||||
/{usr/,}sbin/updatedb.plocate rPx,
|
||||
/{usr/,}sbin/on_ac_power rPx,
|
||||
|
||||
@{run}/plocate.daily.lock rwk,
|
||||
|
||||
include if exists <local/cron-plocate>
|
||||
}
|
|
@ -81,6 +81,7 @@ profile dkms @{exec_path} {
|
|||
owner /tmp/dkms.*/ rw,
|
||||
owner /tmp/tmp.* rw,
|
||||
owner /tmp/sh-thd.* rw,
|
||||
owner /tmp/* rw,
|
||||
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ profile dnscrypt-proxy @{exec_path} {
|
|||
network inet6 dgram,
|
||||
network inet stream,
|
||||
network inet6 stream,
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mrix,
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ include <tunables/global>
|
|||
@{exec_path} = /{usr/,}{s,}bin/ifconfig
|
||||
profile ifconfig @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
# To be able to manage network interfaces.
|
||||
|
|
|
@ -9,6 +9,7 @@ include <tunables/global>
|
|||
@{exec_path} = /{usr/,}bin/mount
|
||||
profile mount @{exec_path} flags=(complain) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/disks-write>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ profile pam-auth-update @{exec_path} flags=(complain) {
|
|||
/{usr/,}bin/perl r,
|
||||
|
||||
/{usr/,}bin/md5sum rix,
|
||||
/{usr/,}bin/cp rix,
|
||||
|
||||
# Think what to do about this (#FIXME#)
|
||||
/usr/share/debconf/frontend rPx,
|
||||
|
|
22
apparmor.d/profiles-m-z/plocate
Normal file
22
apparmor.d/profiles-m-z/plocate
Normal file
|
@ -0,0 +1,22 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021 Mikhail Morfikov
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}bin/plocate
|
||||
profile plocate @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
# For running as root
|
||||
capability dac_read_search,
|
||||
capability setgid,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/var/lib/plocate/plocate.db r,
|
||||
|
||||
include if exists <local/plocate>
|
||||
}
|
21
apparmor.d/profiles-m-z/plocate-build
Normal file
21
apparmor.d/profiles-m-z/plocate-build
Normal file
|
@ -0,0 +1,21 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021 Mikhail Morfikov
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}sbin/plocate-build
|
||||
profile plocate-build @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/var/lib/mlocate/mlocate.db r,
|
||||
|
||||
/var/lib/mlocate/#[0-9]* rw,
|
||||
/var/lib/mlocate/plocate.db rwl -> /var/lib/mlocate/#[0-9]*,
|
||||
|
||||
include if exists <local/plocate-build>
|
||||
}
|
|
@ -28,6 +28,9 @@ profile sudo @{exec_path} {
|
|||
# To write records to the kernel auditing log.
|
||||
capability audit_write,
|
||||
|
||||
# For changing ownership of the /var/log/sudo.log file
|
||||
capability chown,
|
||||
|
||||
# Needed? (#FIXME#)
|
||||
capability sys_resource,
|
||||
capability net_admin,
|
||||
|
@ -55,6 +58,7 @@ profile sudo @{exec_path} {
|
|||
/{usr/,}{s,}bin/[a-z0-9]* rPUx,
|
||||
|
||||
/dev/ r,
|
||||
/dev/ptmx rw,
|
||||
|
||||
# For timestampdir
|
||||
owner @{run}/sudo/ rw,
|
||||
|
@ -72,6 +76,8 @@ profile sudo @{exec_path} {
|
|||
/etc/environment r,
|
||||
/etc/security/limits.d/{,*} r,
|
||||
|
||||
/var/log/sudo.log wk,
|
||||
|
||||
# file_inherit
|
||||
owner /dev/tty[0-9]* rw,
|
||||
owner @{HOME}/.xsession-errors w,
|
||||
|
|
|
@ -15,9 +15,9 @@ profile thinkfan @{exec_path} {
|
|||
/etc/thinkfan.conf r,
|
||||
/etc/thinkfan.yaml r,
|
||||
|
||||
@{sys}/devices/platform/**/hwmon/**/pwm[0-9]* rw,
|
||||
@{sys}/devices/platform/**/hwmon/**/pwm[0-9]*_enable rw,
|
||||
@{sys}/devices/platform/**/hwmon/**/temp[0-9]*_input r,
|
||||
@{sys}/devices/**/hwmon/**/pwm[0-9]* rw,
|
||||
@{sys}/devices/**/hwmon/**/pwm[0-9]*_enable rw,
|
||||
@{sys}/devices/**/hwmon/**/temp[0-9]*_input r,
|
||||
|
||||
@{PROC}/acpi/ibm/thermal r,
|
||||
@{PROC}/acpi/ibm/fan rw,
|
||||
|
|
|
@ -9,6 +9,7 @@ include <tunables/global>
|
|||
@{exec_path} = /{usr/,}bin/umount
|
||||
profile umount @{exec_path} flags=(complain) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
# To be able to umount anything
|
||||
|
|
39
apparmor.d/profiles-m-z/updatedb.plocate
Normal file
39
apparmor.d/profiles-m-z/updatedb.plocate
Normal file
|
@ -0,0 +1,39 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2021 Mikhail Morfikov
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}sbin/updatedb.plocate
|
||||
profile updatedb.plocate @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
capability dac_read_search,
|
||||
capability chown,
|
||||
capability fowner,
|
||||
capability sys_ptrace,
|
||||
|
||||
ptrace (read),
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/etc/updatedb.conf r,
|
||||
|
||||
owner @{PROC}/@{pid}/mountinfo r,
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
|
||||
/var/lib/plocate/plocate.db rw,
|
||||
/var/lib/plocate/#[0-9]* rw,
|
||||
/var/lib/plocate/plocate.db rwl -> /var/lib/plocate/#[0-9]*,
|
||||
|
||||
/ r,
|
||||
/**/ r,
|
||||
|
||||
# file_inherit
|
||||
@{run}/plocate.daily.lock r,
|
||||
|
||||
include if exists <local/updatedb.plocate>
|
||||
}
|
Loading…
Reference in a new issue