From 44b4039806b5512801750794763614ae97d0dacb Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sat, 21 May 2022 18:01:35 +0100 Subject: [PATCH] chore: add not yet upstreamed abstraction for debian. --- configure | 2 ++ dists/debian/abstractions/gtk | 55 +++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 dists/debian/abstractions/gtk diff --git a/configure b/configure index c6164491..09aa5957 100755 --- a/configure +++ b/configure @@ -70,6 +70,8 @@ configure() { _msg "$DISTRIBUTION does not support abi 3.0 yet." find "$ROOT/apparmor.d" -type f -exec sed -e '/abi /d' -i {} \; + + cp -a dists/debian/abstractions/* $ROOT/apparmor.d/abstractions fi _msg "Configure libexec." diff --git a/dists/debian/abstractions/gtk b/dists/debian/abstractions/gtk new file mode 100644 index 00000000..efd2bb4a --- /dev/null +++ b/dists/debian/abstractions/gtk @@ -0,0 +1,55 @@ +# vim:syntax=apparmor +# ------------------------------------------------------------------ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public +# License published by the Free Software Foundation. +# +# ------------------------------------------------------------------ + + abi , + + /usr/share/themes/{,**} r, + + /usr/share/gtksourceview-[0-9]*/{,**} r, + + /usr/share/gtk-2.0/ r, + /usr/share/gtk-2.0/gtkrc r, + + /usr/share/gtk-3.0/ r, + /usr/share/gtk-3.0/settings.ini r, + + /etc/gtk-2.0/ r, + /etc/gtk-2.0/gtkrc r, + + /etc/gtk-3.0/ r, + /etc/gtk-3.0/*.conf r, + + /etc/gtk/gtkrc r, + + owner @{HOME}/.themes/{,**} r, + owner @{HOME}/.local/share/themes/{,**} r, + + owner @{HOME}/.gtk r, + owner @{HOME}/.gtkrc r, + owner @{HOME}/.gtkrc-2.0 r, + owner @{HOME}/.gtk-bookmarks r, + owner @{HOME}/.config/gtkrc r, + owner @{HOME}/.config/gtkrc-2.0 r, + owner @{HOME}/.config/gtk-3.0/ rw, + owner @{HOME}/.config/gtk-3.0/settings.ini r, + owner @{HOME}/.config/gtk-3.0/bookmarks r, + owner @{HOME}/.config/gtk-3.0/gtk.css r, + + # for gtk file dialog + owner @{HOME}/.config/gtk-2.0/ rw, + owner @{HOME}/.config/gtk-2.0/gtkfilechooser.ini* rw, + + # .Xauthority file required for X connections + owner @{HOME}/.Xauthority r, + + # Xsession errors file + owner @{HOME}/.xsession-errors w, + + # Include additions to the abstraction + include if exists \ No newline at end of file