all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: 48265@debbugs.gnu.org
Subject: bug#48265: mate-power-backlight-helper is referred to by store name instead of polkit action (IIUC)
Date: Thu, 06 May 2021 22:24:43 +0200	[thread overview]
Message-ID: <28db052034ca1e3029bb3dc0aa9f87de2af6bdec.camel@telenet.be> (raw)

[-- Attachment #1: Type: text/plain, Size: 2617 bytes --]

Related to: https://issues.guix.gnu.org/22952

On a mate desktop (mate-desktop-service-type).

FN-F9, FN-F10 (binded to ‘decrease brightness’ and ‘increase brightness’):

> Authentication is needed to run '/gnu/store/mp33h4vqdw0scdkjj0v6c3gima9wz8lm-mate-power-manager-1.24.2/sbin/mate-power-backlight-helper' as the super user.

Contents of /etc/polkit-1/actions/org.mate.power.policy:


  [...]
  <icon_name>battery</icon_name>
  <action id="org.mate.power.backlight-helper">
    <!-- SECURITY:
          - A normal active user on the local machine does not need permission
            to change the backlight brightness.
     -->
    <description>Modify the laptop brightness</description>
    <message>Authentication is required to modify the laptop brightness</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/gnu/store/zk4kb4437032swahywmgyzn55b5w5wj8-mate-power-manager-1.24.2/sbin/mate-power-backlight-help>
  </action>
  [...]

FWIW, the following works as expected (no error message), using the store path in .policy:
$ pkexec /gnu/store/zk4kb4437032swahywmgyzn55b5w5wj8-mate-power-manager-1.24.2/sbin/mate-power-backlight-helper --set-brightness=300
Maybe MATE is trying the equivalent of "pkexec /wrong/store/path/mate-power-backlight-helper --etcetera" instead
of referring to the action by name org.mate.power.backlight-helper.

Note the store path is different. Now try something different

$ which mate-power-backlight-helper
> /run/current-system/profile/sbin/mate-power-backlight-helper
$ ls -l /run/current-system/profile/sbin/mate-power-backlight-helper
> /gnu/store/ffqhy4xdpzkg06rlq76zrbwn8v3rqgw9-mate-1.24.1/sbin/mate-power-backlight-helper

Now we have three different store paths so far!

Not sure what the proper way to resolve this, and what causes the three different store paths,
but one way to resolve this would be referring to /run/current-system/profile/sbin/mate-power-backlight-helper
in org.mate.power.policy (untested!).

It looks like there could very well be be similar issues in (unverified):

* /etc/polkit-1/actions/org.gnome.controlcenter.remote-login-helper.policy
* /etc/polkit-1/actions/org.gnome.gnome-system-monitor.policy
* /etc/polkit-1/actions/org.gnome.settings-daemon.plugins.power.policy
* /etc/polkit-1/actions/org.gnome.settings-daemon.plugins.wacom.policy
* grep for /gnu/store/ in /etc/polkit-1/actions/*.policy

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

             reply	other threads:[~2021-05-06 20:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 20:24 Maxime Devos [this message]
2021-05-06 21:02 ` bug#48265: mate-power-backlight-helper is referred to by store name instead of polkit action (IIUC) Ludovic Courtès
2021-05-06 21:18   ` Maxime Devos
2021-05-07  6:38 ` Maxime Devos
2021-05-07  6:48   ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28db052034ca1e3029bb3dc0aa9f87de2af6bdec.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=48265@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.