From 1db6f5f67c25b46c62f5f8fc46a471ffdc970c6e Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 13 Aug 2023 21:19:16 +0100 Subject: [PATCH] feat(profiles): improve ibus entry point. --- apparmor.d/groups/bus/ibus-daemon | 5 ++--- apparmor.d/groups/bus/ibus-dconf | 3 +-- apparmor.d/groups/bus/ibus-engine-simple | 3 +-- apparmor.d/groups/bus/ibus-engine-table | 11 ++++++++++- apparmor.d/groups/bus/ibus-extension-gtk3 | 3 +-- apparmor.d/groups/bus/ibus-memconf | 2 +- apparmor.d/groups/bus/ibus-portal | 3 +-- apparmor.d/groups/bus/ibus-x11 | 3 +-- apparmor.d/groups/gnome/gsd-xsettings | 3 +-- 9 files changed, 19 insertions(+), 17 deletions(-) diff --git a/apparmor.d/groups/bus/ibus-daemon b/apparmor.d/groups/bus/ibus-daemon index 593ac6d4..41c53d22 100644 --- a/apparmor.d/groups/bus/ibus-daemon +++ b/apparmor.d/groups/bus/ibus-daemon @@ -45,9 +45,8 @@ profile ibus-daemon @{exec_path} flags=(attach_disconnected) { @{exec_path} mrix, - @{bin}/{,ba,da}sh rix, - @{lib}/ibus/ibus-* rPx, - @{lib}/ibus-* rPx, + @{bin}/{,ba,da}sh rix, + @{lib}/{,ibus/}ibus-* rPx, /usr/share/ibus/{,**} r, /usr/share/ibus-table/tables/ r, diff --git a/apparmor.d/groups/bus/ibus-dconf b/apparmor.d/groups/bus/ibus-dconf index 1cbdceea..211553c3 100644 --- a/apparmor.d/groups/bus/ibus-dconf +++ b/apparmor.d/groups/bus/ibus-dconf @@ -6,8 +6,7 @@ abi , include -@{exec_path} = @{lib}/ibus/ibus-dconf -@{exec_path} += @{lib}/ibus-dconf +@{exec_path} = @{lib}/{,ibus/}ibus-dconf profile ibus-dconf @{exec_path} flags=(attach_disconnected) { include include diff --git a/apparmor.d/groups/bus/ibus-engine-simple b/apparmor.d/groups/bus/ibus-engine-simple index 1a038d1b..8931cb1e 100644 --- a/apparmor.d/groups/bus/ibus-engine-simple +++ b/apparmor.d/groups/bus/ibus-engine-simple @@ -6,8 +6,7 @@ abi , include -@{exec_path} = @{lib}/ibus/ibus-engine-simple -@{exec_path} += @{lib}/ibus-engine-simple +@{exec_path} = @{lib}/{,ibus/}ibus-engine-simple profile ibus-engine-simple @{exec_path} flags=(attach_disconnected) { include include diff --git a/apparmor.d/groups/bus/ibus-engine-table b/apparmor.d/groups/bus/ibus-engine-table index 754f9250..a702b4a1 100644 --- a/apparmor.d/groups/bus/ibus-engine-table +++ b/apparmor.d/groups/bus/ibus-engine-table @@ -6,7 +6,7 @@ abi , include -@{exec_path} = @{lib}/ibus-engine-table +@{exec_path} = @{lib}/{,ibus/}ibus-engine-table profile ibus-engine-table @{exec_path} { include include @@ -16,5 +16,14 @@ profile ibus-engine-table @{exec_path} { @{bin}/{,ba,da}sh rix, @{bin}/python3.[0-9]* rix, + /usr/share/ibus-table/engine/{,**} r, + /usr/share/ibus-table/tables/ r, + + owner /var/lib/gdm3/.cache/ibus-table/ w, + owner /var/lib/gdm3/.local/share/ibus-table/ w, + + owner @{user_cache_dirs}/ibus-table/ w, + owner @{user_share_dirs}/ibus-table/ w, + include if exists } \ No newline at end of file diff --git a/apparmor.d/groups/bus/ibus-extension-gtk3 b/apparmor.d/groups/bus/ibus-extension-gtk3 index 079b3364..22dfd4f2 100644 --- a/apparmor.d/groups/bus/ibus-extension-gtk3 +++ b/apparmor.d/groups/bus/ibus-extension-gtk3 @@ -6,8 +6,7 @@ abi , include -@{exec_path} = @{lib}/ibus/ibus-extension-gtk3 -@{exec_path} += @{lib}/ibus-extension-gtk3 +@{exec_path} = @{lib}/{,ibus/}ibus-extension-gtk3 profile ibus-extension-gtk3 @{exec_path} flags=(attach_disconnected) { include include diff --git a/apparmor.d/groups/bus/ibus-memconf b/apparmor.d/groups/bus/ibus-memconf index 794e9ad2..4ea7f8af 100644 --- a/apparmor.d/groups/bus/ibus-memconf +++ b/apparmor.d/groups/bus/ibus-memconf @@ -6,7 +6,7 @@ abi , include -@{exec_path} = @{lib}/ibus-memconf +@{exec_path} = @{lib}/{,ibus/}ibus-memconf profile ibus-memconf @{exec_path} { include include diff --git a/apparmor.d/groups/bus/ibus-portal b/apparmor.d/groups/bus/ibus-portal index 6f3ef69f..b4a537a8 100644 --- a/apparmor.d/groups/bus/ibus-portal +++ b/apparmor.d/groups/bus/ibus-portal @@ -6,8 +6,7 @@ abi , include -@{exec_path} = @{lib}/ibus/ibus-portal -@{exec_path} += @{lib}/ibus-portal +@{exec_path} = @{lib}/{,ibus/}ibus-portal profile ibus-portal @{exec_path} flags=(attach_disconnected) { include include diff --git a/apparmor.d/groups/bus/ibus-x11 b/apparmor.d/groups/bus/ibus-x11 index 0b17454e..6b1c1f0b 100644 --- a/apparmor.d/groups/bus/ibus-x11 +++ b/apparmor.d/groups/bus/ibus-x11 @@ -6,8 +6,7 @@ abi , include -@{exec_path} = @{lib}/ibus/ibus-x11 -@{exec_path} += @{lib}/ibus-x11 +@{exec_path} = @{lib}/{,ibus/}ibus-x11 profile ibus-x11 @{exec_path} flags=(attach_disconnected) { include include diff --git a/apparmor.d/groups/gnome/gsd-xsettings b/apparmor.d/groups/gnome/gsd-xsettings index 3caf82c7..c52efb06 100644 --- a/apparmor.d/groups/gnome/gsd-xsettings +++ b/apparmor.d/groups/gnome/gsd-xsettings @@ -126,8 +126,7 @@ profile gsd-xsettings @{exec_path} { @{bin}/run-parts rCx -> run-parts, @{bin}/xprop rPx, @{bin}/xrdb rPx, - @{lib}/ibus-x11 rPx, - @{lib}/ibus/ibus-x11 rPx, + @{lib}/{,ibus/}ibus-x11 rPx, /usr/share/dconf/profile/gdm r, /usr/share/gdm/greeter-dconf-defaults r,