From: Jamie Strandboge <ja...@ubuntu.com>

Create a set of strict and non-strict abstractions, much like the
existing dbus abstractions, for connecting to the fcitx bus.

Signed-off-by: Jamie Strandboge <ja...@ubuntu.com>
[tyhicks: Wrote commit message]
Signed-off-by: Tyler Hicks <tyhi...@canonical.com>
---
 profiles/apparmor.d/abstractions/fcitx        | 13 +++++++++++++
 profiles/apparmor.d/abstractions/fcitx-strict | 21 +++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 profiles/apparmor.d/abstractions/fcitx
 create mode 100644 profiles/apparmor.d/abstractions/fcitx-strict

diff --git a/profiles/apparmor.d/abstractions/fcitx 
b/profiles/apparmor.d/abstractions/fcitx
new file mode 100644
index 0000000..3d26cc9
--- /dev/null
+++ b/profiles/apparmor.d/abstractions/fcitx
@@ -0,0 +1,13 @@
+# vim:syntax=apparmor
+# ------------------------------------------------------------------
+#
+#    Copyright (C) 2016 Canonical Ltd.
+#
+#    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.
+#
+# ------------------------------------------------------------------
+
+  #include <abstractions/fcitx-strict>
+  dbus bus=fcitx,
diff --git a/profiles/apparmor.d/abstractions/fcitx-strict 
b/profiles/apparmor.d/abstractions/fcitx-strict
new file mode 100644
index 0000000..d773734
--- /dev/null
+++ b/profiles/apparmor.d/abstractions/fcitx-strict
@@ -0,0 +1,21 @@
+# vim:syntax=apparmor
+# ------------------------------------------------------------------
+#
+#    Copyright (C) 2016 Canonical Ltd.
+#
+#    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.
+#
+# ------------------------------------------------------------------
+
+  #include <abstractions/dbus-session-strict>
+
+  dbus send
+      bus=fcitx
+      path=/org/freedesktop/DBus
+      interface=org.freedesktop.DBus
+      
member={Hello,AddMatch,RemoveMatch,GetNameOwner,NameHasOwner,StartServiceByName}
+      peer=(name=org.freedesktop.DBus),
+
+  owner @{HOME}/.config/fcitx/dbus/* r,
-- 
2.7.4


-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to