pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/consolekit/files Fix boolean logic error, now...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9c841875a77d
branches:  trunk
changeset: 308839:9c841875a77d
user:      youri <youri%pkgsrc.org@localhost>
date:      Fri Jun 01 21:51:56 2018 +0000

description:
Fix boolean logic error, now non-operator users shouldn't be able to
shutdown or reboot.

diffstat:

 sysutils/consolekit/files/50-shutdown.rules |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r 6ff4043ee4a8 -r 9c841875a77d sysutils/consolekit/files/50-shutdown.rules
--- a/sysutils/consolekit/files/50-shutdown.rules       Fri Jun 01 19:51:40 2018 +0000
+++ b/sysutils/consolekit/files/50-shutdown.rules       Fri Jun 01 21:51:56 2018 +0000
@@ -1,8 +1,8 @@
 polkit.addRule(function (action, subject) {
-       if (action.id == "org.freedesktop.consolekit.system.restart" ||
+       if ((action.id == "org.freedesktop.consolekit.system.restart" ||
        action.id == "org.freedesktop.consolekit.system.stop"  ||
        action.id == "org.freedesktop.consolekit.system.suspend" ||
-       action.id == "org.freedesktop.consolekit.system.hibernate"
+       action.id == "org.freedesktop.consolekit.system.hibernate")
        && subject.isInGroup("operator")) {
                return polkit.Result.YES;
        }



Home | Main Index | Thread Index | Old Index