mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
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:
parent
1739c07ca1
commit
e38f2ac721
1 changed files with 29 additions and 0 deletions
29
apparmor.d/abstractions/editor
Normal file
29
apparmor.d/abstractions/editor
Normal 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>
|
Loading…
Reference in a new issue