From 7bf4f3a9a0a5e54c5f4ecab93fc86842f9a4e62d Mon Sep 17 00:00:00 2001 From: Vincas Dargis Date: Sun, 5 Aug 2018 19:16:12 +0300 Subject: [PATCH] Add qt5-write abstraction Qt-based applications stores QFileDialog (latest browsed directory) and other shared user settings inside ~/.config/QtProject.conf. Currently available qt abstraction only allows to read it (by design), so this patch introduces abstraction that grants permissions for writing. PR: https://gitlab.com/apparmor/apparmor/merge_requests/159 (cherry picked from commit 69c4cabb93f1f07189687f830cdca7ddc506b857) Signed-off-by: John Johansen --- profiles/apparmor.d/abstractions/qt5-settings-write | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 profiles/apparmor.d/abstractions/qt5-settings-write diff --git a/profiles/apparmor.d/abstractions/qt5-settings-write b/profiles/apparmor.d/abstractions/qt5-settings-write new file mode 100644 index 000000000..f9321eaf3 --- /dev/null +++ b/profiles/apparmor.d/abstractions/qt5-settings-write @@ -0,0 +1,11 @@ +# vim:syntax=apparmor +# Allow writing shared settings for Qt-based applications + + # User files + + owner @{HOME}/.config/#[0-9]* rw, + owner @{HOME}/.config/QtProject.conf rw, + owner @{HOME}/.config/QtProject.conf.?????? l -> @{HOME}/.config/#[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9], + owner @{HOME}/.config/QtProject.conf.?????? rw, # for temporary files like QtProject.conf.Aqrgeb + owner @{HOME}/.config/QtProject.conf.lock rwk, +