feat(profile): general update.
This commit is contained in:
parent
492c5a37dd
commit
a5f71675ea
13 changed files with 58 additions and 136 deletions
|
|
@ -1,34 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2019-2021 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/popcon-largest-unused
|
||||
profile popcon-largest-unused @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/perl>
|
||||
|
||||
@{exec_path} r,
|
||||
@{bin}/perl r,
|
||||
|
||||
@{sh_path} rix,
|
||||
@{bin}/{,e}grep rix,
|
||||
@{bin}/sort rix,
|
||||
@{bin}/cut rix,
|
||||
@{bin}/xargs rix,
|
||||
|
||||
@{bin}/apt-cache rPx,
|
||||
|
||||
/var/log/popularity-contest r,
|
||||
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
|
||||
# For shell pwd
|
||||
/root/ r,
|
||||
|
||||
include if exists <local/popcon-largest-unused>
|
||||
}
|
||||
|
|
@ -13,14 +13,12 @@ profile popularity-contest @{exec_path} {
|
|||
include <abstractions/perl>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
# For popularity-contest --su-nobody
|
||||
capability setuid,
|
||||
capability setgid,
|
||||
|
||||
capability sys_ptrace,
|
||||
ptrace (read),
|
||||
|
||||
capability dac_read_search,
|
||||
capability setgid,
|
||||
capability setuid, # For popularity-contest --su-nobody
|
||||
capability sys_ptrace,
|
||||
|
||||
ptrace (read),
|
||||
|
||||
@{exec_path} r,
|
||||
@{bin}/perl r,
|
||||
|
|
@ -32,31 +30,24 @@ profile popularity-contest @{exec_path} {
|
|||
# ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded (cannot open
|
||||
# shared object file): ignored.
|
||||
@{bin}/dpkg-query rpx,
|
||||
#
|
||||
@{bin}/dpkg rPx -> child-dpkg,
|
||||
@{bin}/dpkg-divert rPx -> child-dpkg-divert,
|
||||
|
||||
# For shell pwd
|
||||
/root/ r,
|
||||
|
||||
/etc/popularity-contest.conf r,
|
||||
|
||||
/etc/dpkg/origins/debian r,
|
||||
|
||||
/etc/shadow r,
|
||||
|
||||
/var/lib/dpkg/info/{,*.list} r,
|
||||
|
||||
@{PROC}/ r,
|
||||
|
||||
/var/log/ r,
|
||||
/var/log/popularity-contest.new w,
|
||||
/root/ r, # For shell pwd
|
||||
|
||||
/var/lib/ r,
|
||||
|
||||
# file_inherit
|
||||
/tmp/#@{int} rw,
|
||||
/var/lib/dpkg/info/{,*.list} r,
|
||||
/var/log/ r,
|
||||
/var/log/popularity-contest.[0-9]* w,
|
||||
/var/log/popularity-contest.new w,
|
||||
|
||||
owner /tmp/#@{int} rw,
|
||||
|
||||
@{PROC}/ r,
|
||||
|
||||
include if exists <local/popularity-contest>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue