From 9ee284eb961ca51d8dc1f2822b2bf30de9d940da Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 5 Jul 2022 19:10:19 +0000 Subject: polkit: add rule to allow agl-driver to control agl-app@ systemd services Bug-AGL: SPEC-4466 Signed-off-by: Denys Dmytriyenko Change-Id: I8007aacc12f8b6bdfbca660c994d321ef1b5eca7 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/27751 Reviewed-by: Scott Murray Reviewed-by: Marius Vlad Reviewed-by: Jan-Simon Moeller Tested-by: Jan-Simon Moeller --- .../recipes-config/polkit-rule-agl-app/files/50-agl-app.rules | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 meta-app-framework/recipes-config/polkit-rule-agl-app/files/50-agl-app.rules (limited to 'meta-app-framework/recipes-config/polkit-rule-agl-app/files/50-agl-app.rules') diff --git a/meta-app-framework/recipes-config/polkit-rule-agl-app/files/50-agl-app.rules b/meta-app-framework/recipes-config/polkit-rule-agl-app/files/50-agl-app.rules new file mode 100644 index 000000000..5fa34fbd2 --- /dev/null +++ b/meta-app-framework/recipes-config/polkit-rule-agl-app/files/50-agl-app.rules @@ -0,0 +1,7 @@ +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.systemd1.manage-units" && + action.lookup("unit").indexOf("agl-app@") == 0 && + subject.user == "agl-driver") { + return polkit.Result.YES; + } +}); -- cgit 1.2.3-korg