diff mbox series

[v2,17/23] kernel-shark-qt: Add PolicyKit Configuration for kshark-record

Message ID 20181016155232.5257-18-ykaradzhov@vmware.com (mailing list archive)
State Accepted
Headers show
Series Add Qt-based GUI for KernelShark | expand

Commit Message

Yordan Karadzhov Oct. 16, 2018, 3:53 p.m. UTC
The PolicyKit Policy Configuration  will allow the kshark-record
executable to be started as Root via pkexec.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 .../org.freedesktop.kshark-record.policy       | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 kernel-shark-qt/org.freedesktop.kshark-record.policy
diff mbox series

Patch

diff --git a/kernel-shark-qt/org.freedesktop.kshark-record.policy b/kernel-shark-qt/org.freedesktop.kshark-record.policy
new file mode 100644
index 0000000..dc73817
--- /dev/null
+++ b/kernel-shark-qt/org.freedesktop.kshark-record.policy
@@ -0,0 +1,18 @@ 
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+  "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+  "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+  <action id="org.freedesktop.pkexec.kshark-record">
+    <message gettext-domain="gparted">Authentication is required to run KernelShark Record</message>
+    <defaults>
+      <allow_any>auth_admin</allow_any>
+      <allow_inactive>auth_admin</allow_inactive>
+      <allow_active>auth_admin</allow_active>
+    </defaults>
+    <annotate key="org.freedesktop.policykit.exec.path">/usr/local/bin/kshark-record</annotate>
+    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+  </action>
+
+</policyconfig>