Interceptor for org.freedesktop.DBus.Properties.Set
vishwa
vishwa at linux.vnet.ibm.com
Tue Sep 13 18:41:04 AEST 2016
/org/openbmc/settings/host0 provides the dbus properties that are
settable via org.freedesktop.DBus.properties.Set.
The properties are treated as user settings and are consumed by
respective daemons by having a signal handler registered for
PropertyChanged method.
The challenge at the hand is "How to make sure the users that set the
property are choosing a valid value".
Since its set by org.freedesktop.DBus.Properties.Set, the ideal way
would be to register a callback that would validate the user input based
on custom algo and then only would let the .Set continue.
Without an interceptor, the user settings may be as junk as "abcdef" and
the *settings damon* can only react to that change and can put the
previous value back into it post verification.
I did a lot of search on ways to register an interceptor and did not see
one. I then asked in #dbus and they told me that there is no way to
intercept that.
So the solution what I have at the moment is to
1) Disable the property set via freedesktop
2) Introduce a custom Setter "org.openbmc.Settings.Host.Set" which can
do the job of validating the inputs also.
Please let me know if there are better approaches.
Thanks.
Vishwanatha Subbanna.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20160913/7d3b0bc5/attachment.html>
More information about the openbmc
mailing list