summaryrefslogtreecommitdiff
path: root/dbus
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-03-31 12:11:29 +0200
committerBastien Nocera <hadess@hadess.net>2022-04-19 15:27:36 +0200
commitd0ebbe32bb5cec06335a7bd0f11f8550deaec16e (patch)
treedc3b692019398284fac9034e4f2dd845ffeaa786 /dbus
parent2f3ccee059f85888a6f77f1634ac55a871bc728c (diff)
downloadupower-d0ebbe32bb5cec06335a7bd0f11f8550deaec16e.tar.gz
device: Only handle Refresh() method if in debug mode
The Refresh D-Bus method could be used by clients to force re-reading the state of batteries in the upower backends. This is not needed as all the backends should be sending events when their states changes, removing the need for an explicit refresh. This is also a potential security problem if applications keep on refreshing their data. We now only allow access to the Refresh() method if the daemon was started in debugging mode. This should make it clearer that it is a debug tool. Also remove a mention of the never implemented refresh-power-source polkit authorisation.
Diffstat (limited to 'dbus')
-rw-r--r--dbus/org.freedesktop.UPower.Device.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbus/org.freedesktop.UPower.Device.xml b/dbus/org.freedesktop.UPower.Device.xml
index f286aa7..17781c5 100644
--- a/dbus/org.freedesktop.UPower.Device.xml
+++ b/dbus/org.freedesktop.UPower.Device.xml
@@ -146,7 +146,7 @@ method return sender=:1.386 -> dest=:1.477 reply_serial=2
Refreshes the data collected from the power source.
</doc:para>
</doc:description>
- <doc:permission>Callers need the org.freedesktop.upower.refresh-power-source authorization</doc:permission>
+ <doc:permission>Callers will need to make sure that the daemon was started in debug mode</doc:permission>
<doc:errors>
<doc:error name="&ERROR_GENERAL;">if an error occured while refreshing</doc:error>
</doc:errors>