Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37851684
en ru br
ALT Linux repos
S:1.32.0-alt4

Group :: Graphical desktop/Other
RPM: lightdm

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: lightdm-1.30.0-alt-polkit.patch
Download


 data/Makefile.am   |  4 ++++
 data/lightdm.rules | 12 ++++++++++++
 2 files changed, 16 insertions(+)
diff --git a/data/Makefile.am b/data/Makefile.am
index c9f38f25..aabdcfc0 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -41,6 +41,10 @@ install-exec-hook:
 polkitdir = $(datadir)/polkit-1/actions
 polkit_in_files = org.freedesktop.DisplayManager.AccountsService.policy.in
 polkit_DATA = $(polkit_in_files:.policy.in=.policy)
+
+polkitrulesdir = $(datadir)/polkit-1/rules.d
+polkitrules_DATA = lightdm.rules
+
 @INTLTOOL_POLICY_RULE@
 
 dist_man1_MANS = dm-tool.1 \
diff --git a/data/lightdm.rules b/data/lightdm.rules
new file mode 100644
index 00000000..82de70bd
--- /dev/null
+++ b/data/lightdm.rules
@@ -0,0 +1,12 @@
+polkit.addRule(function(action, subject) {
+    if (subject.user == "_ldm") {
+        polkit.log("action=" + action);
+        polkit.log("subject=" + subject);
+        if (action.id.indexOf("org.freedesktop.login1.") == 0) {
+            return polkit.Result.YES;
+        }
+        if (action.id.indexOf("org.freedesktop.upower.") == 0) {
+            return polkit.Result.YES;
+        }
+    }
+});
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin