[systemd-devel] [systemd-level]: how to set property to read only in systemd?
www
ouyangxuan10 at 163.com
Tue Apr 21 11:54:58 UTC 2020
hi Lennart,
I mean the DBUS property.
root at demoboard:/# busctl set-property org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus Features as 1 x
Cannot set read-only property -- the default
root at demoboard:/# busctl set-property com.sugon.sensors.DISCRETE /com/sugon/sensors/HDD/HDD4_Status xyz.openbmc_project.Sensor.DiscreteAll FanDeviceInserted b true -- new add
root at demoboard:/#
I want the property on Dbus is read only. Just can modify by the special method and cannot modify the property directly. How can I change it like this?
thanks,
Byron
At 2020-04-21 00:43:00, "Lennart Poettering" <lennart at poettering.net> wrote:
>On Mo, 20.04.20 23:00, www (ouyangxuan10 at 163.com) wrote:
>
>> dear all;
>>
>>
>> How to set some properties in systemd to read-only? Who can give the sample code?
>
>I don't understand the question. Do you mean a D-Bus property? They
>generally are read-only for unprivileged bus clients. With a PolicyKit
>action configuration you can open them up, but typically unprivileged
>clients can't change them.
>
>Lennart
>
>--
>Lennart Poettering, Berlin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200421/e95522cb/attachment.htm>
More information about the systemd-devel
mailing list