refractor: move more profiles to groups.

This commit is contained in:
Alexandre Pujol 2025-02-17 21:04:28 +01:00
parent 5aab9da030
commit 5870e1ee40
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
48 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2021 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{bin}/filecap
profile filecap @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
@{exec_path} mr,
# The default behavior is to check only the directories in the PATH environmental variable.
@{bin}/ r,
@{bin}/* r,
/usr/local/sbin/ r,
/usr/local/sbin/* r,
/usr/local/bin/ r,
/usr/local/bin/* r,
# It's also possible to check any dir/file in the system by using the "-a" flag.
#capability dac_read_search,
#/ r,
#/** r,
include if exists <local/filecap>
}
# vim:syntax=apparmor

View file

@ -0,0 +1,36 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2021 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{bin}/netcap
profile netcap @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
capability sys_ptrace,
capability dac_read_search,
ptrace (read),
@{exec_path} mr,
@{PROC}/ r,
@{PROC}/@{pid}/net/dev r,
@{PROC}/@{pid}/net/packet r,
@{PROC}/@{pid}/net/raw{,6} r,
@{PROC}/@{pid}/net/tcp{,6} r,
@{PROC}/@{pid}/net/udp{,6} r,
@{PROC}/@{pid}/net/udplite{,6} r,
@{PROC}/@{pids}/fd/ r,
@{PROC}/@{pids}/stat r,
include if exists <local/netcap>
}
# vim:syntax=apparmor

View file

@ -0,0 +1,28 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2021 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{bin}/pscap
profile pscap @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
capability sys_ptrace,
ptrace (read),
@{exec_path} mr,
@{PROC}/ r,
@{PROC}/@{pids}/stat r,
include if exists <local/pscap>
}
# vim:syntax=apparmor