mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
feat(profile): add some whonix specific profiles.
This commit is contained in:
parent
c5ed997b6d
commit
eeb990a934
4 changed files with 119 additions and 0 deletions
47
apparmor.d/groups/whonix/anondate
Normal file
47
apparmor.d/groups/whonix/anondate
Normal file
|
@ -0,0 +1,47 @@
|
|||
# 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} = @{bin}/anondate{,-get,-set}
|
||||
profile anondate @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/python>
|
||||
|
||||
@{exec_path} mrix,
|
||||
|
||||
@{sh_path} rix,
|
||||
@{bin}/cat rix,
|
||||
@{bin}/cp rix,
|
||||
@{bin}/date rix,
|
||||
@{bin}/grep rix,
|
||||
@{bin}/minimum-unixtime-show rix,
|
||||
@{bin}/rm rix,
|
||||
@{bin}/systemd-cat rPx,
|
||||
@{bin}/tee rix,
|
||||
@{bin}/timeout rix,
|
||||
@{bin}/tor-circuit-established-check rix,
|
||||
@{bin}/touch rix,
|
||||
@{bin}/whoami rix,
|
||||
|
||||
@{lib}/helper-scripts/{,**} r,
|
||||
@{lib}/helper-scripts/tor_bootstrap_check.py rPx,
|
||||
@{lib}/helper-scripts/tor_consensus_valid-after.py rPx,
|
||||
|
||||
/usr/share/timesanitycheck/{,**} r,
|
||||
|
||||
/var/lib/sdwdate/time-replay-protection-utc-unixtime r,
|
||||
|
||||
owner /tmp/tmp.@{rand10} rw,
|
||||
|
||||
@{run}/tor/control.authcookie r,
|
||||
@{run}/tor/log r,
|
||||
owner @{run}/sdwdate/* rw,
|
||||
|
||||
include if exists <local/anondate>
|
||||
}
|
24
apparmor.d/groups/whonix/msgdispatcher-delete
Normal file
24
apparmor.d/groups/whonix/msgdispatcher-delete
Normal 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_delete_wrapper
|
||||
profile msgdispatcher-delete @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
|
||||
capability dac_read_search,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{sh_path} rix,
|
||||
@{bin}/rm rix,
|
||||
|
||||
@{run}/msgcollector/user/* rw,
|
||||
|
||||
include if exists <local/msgdispatcher-delete>
|
||||
}
|
23
apparmor.d/groups/whonix/tor-bootstrap-check
Normal file
23
apparmor.d/groups/whonix/tor-bootstrap-check
Normal file
|
@ -0,0 +1,23 @@
|
|||
# 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}/helper-scripts/tor_bootstrap_check.py
|
||||
profile tor-bootstrap-check @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/python>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{lib}/helper-scripts/{,**} r,
|
||||
|
||||
owner /tmp/tmp.@{rand10} rw,
|
||||
|
||||
@{run}/tor/control.authcookie r,
|
||||
|
||||
include if exists <local/tor-bootstrap-check>
|
||||
}
|
25
apparmor.d/groups/whonix/tor-consensus-valid-after
Normal file
25
apparmor.d/groups/whonix/tor-consensus-valid-after
Normal file
|
@ -0,0 +1,25 @@
|
|||
# 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}/helper-scripts/tor_consensus_valid-after.py
|
||||
profile tor-consensus-valid-after @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/python>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{lib}/helper-scripts/{,**} r,
|
||||
|
||||
@{run}/tor/control.authcookie r,
|
||||
owner @{run}/sdwdate/* rw,
|
||||
|
||||
owner /tmp/tmp.@{rand10} rw,
|
||||
|
||||
include if exists <local/tor-consensus-valid-after>
|
||||
}
|
Loading…
Reference in a new issue