feat(profile): whonix: add msgcollector profiles.

This commit is contained in:
Alexandre Pujol 2024-04-05 23:27:31 +01:00
parent c482234b64
commit 14b779d29b
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
6 changed files with 142 additions and 0 deletions

View File

@ -0,0 +1,46 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/msgcollector/msgcollector
profile msgcollector @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
@{exec_path} mr,
@{sh_path} rix,
@{bin}/basename rix,
@{bin}/cat rix,
@{bin}/touch rix,
@{bin}/tput rix,
@{bin}/whoami rix,
@{lib}/msgcollector/msgdispatcher_dispatch_x rPx,
@{lib}/msgcollector/striphtml rPx,
@{lib}/msgcollector/{,**} r,
@{bin}/sudo rCx -> sudo,
owner @{run}/msgcollector/user/{,**} rw,
profile sudo {
include <abstractions/base>
include <abstractions/app/sudo>
@{bin}/rm rix,
@{lib}/msgcollector/msgdispatcher_delete_wrapper rix,
@{run}/msgcollector/user/* rw,
include if exists <local/msgcollector_sudo>
}
include if exists <local/msgcollector>
}

View File

@ -0,0 +1,17 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/msgcollector/br_add
profile msgcollector-br-add @{exec_path} {
include <abstractions/base>
include <abstractions/python>
@{exec_path} mr,
include if exists <local/msgcollector-br-add>
}

View File

@ -0,0 +1,19 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/msgcollector/generic_gui_message
profile msgcollector-generic-gui-message @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/python>
include <abstractions/xfce>
@{exec_path} mr,
include if exists <local/msgcollector-generic-gui-message>
}

View File

@ -0,0 +1,17 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/msgcollector/striphtml
profile msgcollector-striphtml @{exec_path} {
include <abstractions/base>
include <abstractions/python>
@{exec_path} mr,
include if exists <local/msgcollector-striphtml>
}

View File

@ -0,0 +1,24 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/msgcollector/msgdispatcher_xdg_autostart
profile msgdispatcher-autostart @{exec_path} {
include <abstractions/base>
@{exec_path} mr,
@{sh_path} r,
@{lib}/msgcollector/msgdispatcher rPx,
owner @{HOME}/.xsession-errors w,
/dev/tty rw,
include if exists <local/msgdispatcher-autostart>
}

View File

@ -0,0 +1,19 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/msgcollector/msgdispatcher_dispatch_x
profile msgdispatcher-dispatch @{exec_path} {
include <abstractions/base>
include <abstractions/python>
include <abstractions/nameservice-strict>
include <abstractions/desktop>
@{exec_path} mr,
include if exists <local/msgdispatcher-dispatch>
}