Create editor abstraction

I'm counting seven profiles that have a child profile named "editor" that all include roughly the same boiler plate policies. Let's abstract it out.
This commit is contained in:
doublez13 2024-05-11 14:52:59 -06:00 committed by Alex
parent 1739c07ca1
commit e38f2ac721

View file

@ -0,0 +1,29 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Zane Zakraisek <zz@eng.utah.edu>
# SPDX-License-Identifier: GPL-2.0-only
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,
include if exists <abstractions/editor.d>