Merge branch 'main' into patch-profiles-m-r
This commit is contained in:
commit
280289247d
72 changed files with 1103 additions and 611 deletions
|
|
@ -59,7 +59,7 @@ profile mkinitramfs @{exec_path} {
|
|||
@{bin}/kmod rCx -> kmod,
|
||||
@{bin}/ldconfig rCx -> ldconfig,
|
||||
@{bin}/ldd rCx -> ldd,
|
||||
@{lib}/ld-linux.so.2 rCx -> ldd,
|
||||
@{lib}/ld-linux.so* rCx -> ldd,
|
||||
|
||||
@{bin}/dpkg rPx -> child-dpkg,
|
||||
@{bin}/linux-version rPx,
|
||||
|
|
|
|||
17
apparmor.d/profiles-m-r/odt2txt
Normal file
17
apparmor.d/profiles-m-r/odt2txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2024 valoq <valoq@mailbox.org>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/odt2txt
|
||||
profile odt2txt @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/user-write-strict>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/odt2txt>
|
||||
}
|
||||
19
apparmor.d/profiles-m-r/pdftotext
Normal file
19
apparmor.d/profiles-m-r/pdftotext
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2024 valoq <valoq@mailbox.org>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/pdftotext
|
||||
profile pdftotext @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/user-write-strict>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/usr/share/poppler/{,**} r,
|
||||
|
||||
include if exists <local/pdftotext>
|
||||
}
|
||||
|
|
@ -12,8 +12,7 @@ profile pkcs11-register @{exec_path} {
|
|||
|
||||
@{exec_path} mr,
|
||||
|
||||
/etc/opensc.conf r,
|
||||
/etc/opensc/opensc.conf r,
|
||||
/etc/{,opensc/}opensc.conf r,
|
||||
|
||||
owner @{HOME}/.mozilla/firefox/*/pkcs11.txt rw,
|
||||
owner @{HOME}/.mozilla/firefox/profiles.ini r,
|
||||
|
|
|
|||
|
|
@ -2,80 +2,46 @@
|
|||
# Copyright (C) 2023-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# Warning: only the protonmail-bridge CLI and service are supported, NOT the GUI.
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/protonmail-bridge
|
||||
profile protonmail-bridge @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
@{config_dirs} = @{user_config_dirs}/protonmail/bridge-v3
|
||||
@{cache_dirs} = @{user_cache_dirs}/protonmail/bridge-v3 "@{user_cache_dirs}/Proton AG/Proton Mail Bridge"
|
||||
@{share_dirs} = @{user_share_dirs}/protonmail/bridge-v3
|
||||
|
||||
network inet dgram,
|
||||
network inet6 dgram,
|
||||
@{exec_path} = @{lib}/protonmail/bridge/bridge-gui
|
||||
profile protonmail-bridge @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/dconf-write>
|
||||
include <abstractions/desktop>
|
||||
include <abstractions/graphics>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/qt5-shader-cache>
|
||||
|
||||
# network inet dgram,
|
||||
# network inet6 dgram,
|
||||
network inet stream,
|
||||
network inet6 stream,
|
||||
network netlink raw,
|
||||
# network netlink raw,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{bin}/pass rCx -> pass,
|
||||
@{lib}/protonmail/bridge/bridge rPx,
|
||||
@{open_path} rPx -> child-open-strict,
|
||||
|
||||
/etc/lsb-release r,
|
||||
/etc/machine-id r,
|
||||
|
||||
owner /var/tmp/etilqs_@{hex} rw,
|
||||
owner @{config_dirs}/ rw,
|
||||
owner @{config_dirs}/** rwlk -> @{config_dirs}/**,
|
||||
|
||||
owner @{user_password_store_dirs}/docker-credential-helpers/{,**} r,
|
||||
owner @{user_password_store_dirs}/protonmail-credentials/{,**} r,
|
||||
owner @{cache_dirs}/ rw,
|
||||
owner @{cache_dirs}/** rwlk -> @{cache_dirs}/**,
|
||||
|
||||
owner @{user_cache_dirs}/protonmail/{,**} rwk,
|
||||
owner @{user_config_dirs}/protonmail/{,**} rwk,
|
||||
owner @{user_share_dirs}/protonmail/{,**} rwk,
|
||||
owner @{share_dirs}/ rw,
|
||||
owner @{share_dirs}/** rwlk -> @{share_dirs}/**,
|
||||
|
||||
@{PROC}/sys/net/core/somaxconn r,
|
||||
@{PROC}/@{pid}/cgroup r,
|
||||
|
||||
# Force the use of the Gnome Keyring or Kwallet secret-service.
|
||||
# Comment these lines and add the commented lines in your local/protonmail-bridge
|
||||
# to allow the use of pass as secret-service.
|
||||
# of pass as secret store
|
||||
# deny @{bin}/pass rmx,
|
||||
# deny owner @{user_password_store_dirs}/** r,
|
||||
|
||||
profile pass {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
@{bin}/pass mr,
|
||||
|
||||
@{sh_path} rix,
|
||||
@{bin}/base64 rix,
|
||||
@{bin}/dirname rix,
|
||||
@{bin}/env rix,
|
||||
@{bin}/getopt rix,
|
||||
@{bin}/git rPx -> pass//git,
|
||||
@{bin}/gpg{,2} rPx -> pass//gpg,
|
||||
@{bin}/mkdir rix,
|
||||
@{bin}/rm rix,
|
||||
@{bin}/rmdir rix,
|
||||
@{bin}/sed rix,
|
||||
@{bin}/tail rix,
|
||||
@{bin}/tree rix,
|
||||
@{bin}/tty rix,
|
||||
@{bin}/which rix,
|
||||
|
||||
owner @{user_password_store_dirs}/ r,
|
||||
owner @{user_password_store_dirs}/.gpg-id r,
|
||||
owner @{user_password_store_dirs}/protonmail-credentials/{,**} rw,
|
||||
deny owner @{user_password_store_dirs}/**/ r,
|
||||
|
||||
/dev/tty rw,
|
||||
|
||||
include if exists <local/protonmail-bridge_pass>
|
||||
}
|
||||
owner @{PROC}/@{pid}/cmdline r,
|
||||
|
||||
include if exists <local/protonmail-bridge>
|
||||
}
|
||||
|
|
|
|||
85
apparmor.d/profiles-m-r/protonmail-bridge-core
Normal file
85
apparmor.d/profiles-m-r/protonmail-bridge-core
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2023-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# To force the use of the Gnome Keyring or Kwallet secret-service, add the
|
||||
# following lines in your local/protonmail-bridge-core file:
|
||||
# deny @{bin}/pass x,
|
||||
# deny owner @{user_password_store_dirs}/** r,
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{lib}/protonmail/bridge/bridge
|
||||
profile protonmail-bridge-core @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
network inet dgram,
|
||||
network inet6 dgram,
|
||||
network inet stream,
|
||||
network inet6 stream,
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{bin}/pass rCx -> pass,
|
||||
|
||||
/etc/lsb-release r,
|
||||
/etc/machine-id r,
|
||||
|
||||
owner @{user_password_store_dirs}/docker-credential-helpers/{,**} r,
|
||||
owner @{user_password_store_dirs}/protonmail-credentials/{,**} r,
|
||||
|
||||
owner @{user_cache_dirs}/protonmail/{,**} rwk,
|
||||
owner @{user_config_dirs}/protonmail/{,**} rwk,
|
||||
owner @{user_share_dirs}/protonmail/{,**} rwk,
|
||||
|
||||
owner "@{user_config_dirs}/autostart/Proton Mail Bridge.desktop" rw,
|
||||
|
||||
owner @{tmp}/bridge@{int} rw,
|
||||
owner @{tmp}/user/@{uid}/etilqs_@{hex} rw,
|
||||
owner /var/tmp/etilqs_@{hex} rw,
|
||||
|
||||
@{PROC}/ r,
|
||||
@{PROC}/sys/net/core/somaxconn r,
|
||||
@{PROC}/@{pid}/cgroup r,
|
||||
|
||||
deny @{bin}/pass x,
|
||||
deny owner @{user_password_store_dirs}/** r,
|
||||
|
||||
profile pass {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
@{bin}/pass mr,
|
||||
|
||||
@{sh_path} rix,
|
||||
@{bin}/base64 rix,
|
||||
@{bin}/dirname rix,
|
||||
@{bin}/env rix,
|
||||
@{bin}/getopt rix,
|
||||
@{bin}/git rpx -> pass//git,
|
||||
@{bin}/gpg{,2} rpx -> pass//gpg,
|
||||
@{bin}/mkdir rix,
|
||||
@{bin}/rm rix,
|
||||
@{bin}/rmdir rix,
|
||||
@{bin}/sed rix,
|
||||
@{bin}/tail rix,
|
||||
@{bin}/tree rix,
|
||||
@{bin}/tty rix,
|
||||
@{bin}/which rix,
|
||||
|
||||
owner @{user_password_store_dirs}/ r,
|
||||
owner @{user_password_store_dirs}/.gpg-id r,
|
||||
owner @{user_password_store_dirs}/protonmail-credentials/{,**} rw,
|
||||
deny owner @{user_password_store_dirs}/**/ r,
|
||||
|
||||
/dev/tty rw,
|
||||
|
||||
include if exists <local/protonmail-bridge-core_pass>
|
||||
}
|
||||
|
||||
include if exists <local/protonmail-bridge-core>
|
||||
}
|
||||
|
|
@ -63,6 +63,4 @@ profile qpdfview @{exec_path} {
|
|||
include if exists <local/qpdfview>
|
||||
}
|
||||
|
||||
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ profile rngd @{exec_path} flags=(attach_disconnected) {
|
|||
|
||||
/etc/conf.d/rngd r,
|
||||
/etc/machine-id r,
|
||||
/etc/opensc.conf r,
|
||||
/etc/opensc/opensc.conf r,
|
||||
/etc/{,opensc/}opensc.conf r,
|
||||
/var/lib/dbus/machine-id r,
|
||||
|
||||
@{sys}/devices/virtual/misc/hw_random/rng_available r,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue