Merge branch 'main' of github.com:roddhjav/apparmor.d

* 'main' of github.com:roddhjav/apparmor.d:
  Create profile for taskwarrior-tui
  Create profile for taskwarrior
This commit is contained in:
Alexandre Pujol 2024-04-05 23:49:28 +01:00
commit 000e68fe0a
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
2 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,70 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Zane Zakraisek <zz@eng.utah.edu>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/task
profile task @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
include <abstractions/ssl_certs>
# Task can optionally connect to a taskserver
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
network netlink raw,
@{exec_path} mr,
@{sh_path} rix,
@{bin}/vim rCx -> editor,
@{bin}/vim.* rCx -> editor,
@{bin}/sensible-editor rCx -> editor,
/usr/share/{doc/,}task{warrior,}/** r,
# Task can edit it's own config, so write is needed
owner @{HOME}/.taskrc rw,
owner @{HOME}/.task/{,**} rwk,
profile editor {
include <abstractions/base>
include <abstractions/nameservice-strict>
@{bin}/sensible-editor mr,
@{bin}/vim mrix,
@{bin}/vim.* mrix,
@{sh_path} rix,
@{bin}/which{,.debianutils} rix,
/usr/share/vim/{,**} r,
/usr/share/terminfo/** r,
/etc/vimrc r,
/etc/vim/{,**} r,
owner @{HOME}/.selected_editor r,
owner @{HOME}/.viminfo{,.tmp} rw,
owner @{HOME}/.vimrc r,
# Vim swap file
owner @{HOME}/ r,
owner @{user_cache_dirs}/ r,
owner @{user_cache_dirs}/vim/** wr,
# Taskwarrior related files
owner @{HOME}/.task/ r,
owner @{HOME}/.task/* rw,
include if exists <local/task_editor>
}
include if exists <local/task>
}

View File

@ -0,0 +1,32 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Zane Zakraisek <zz@eng.utah.edu>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/taskwarrior-tui
profile taskwarrior-tui @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
@{exec_path} mr,
@{bin}/task rPx,
/usr/share/{doc/,}task{warrior,}/** r,
owner @{HOME}/.taskrc r,
owner @{HOME}/.task/{,**} rwlk,
owner @{user_share_dirs}/taskwarrior-tui/{,**} rwk,
owner @{user_config_dirs}/taskwarrior-tui/{,**} r,
owner @{PROC}/@{pid}/cgroup r,
owner @{PROC}/@{pid}/mountinfo r,
@{sys}/fs/cgroup/**/cpu.max r,
include if exists <local/taskwarrior-tui>
}