<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial;font-size:10.5pt" ><div dir="ltr" >What suggestions did you get back from #dbus?</div>
<div dir="ltr" > </div>
<div dir="ltr" >Making the properties read only and enabling access via a method with specific validation seems reasonable.</div>
<div dir="ltr" > </div>
<div dir="ltr" ><br><br>Chris Austen<br>POWER Systems Enablement Manager<br>(512) 286-5184 (T/L: 363-5184)</div>
<div dir="ltr" > </div>
<div dir="ltr" > </div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" >----- Original message -----<br>From: vishwa <vishwa@linux.vnet.ibm.com><br>Sent by: "openbmc" <openbmc-bounces+austenc=us.ibm.com@lists.ozlabs.org><br>To: OpenBMC Maillist <openbmc@lists.ozlabs.org><br>Cc:<br>Subject: Interceptor for org.freedesktop.DBus.Properties.Set<br>Date: Tue, Sep 13, 2016 3:41 AM<br> <br><!--Notes ACF
<meta http-equiv="content-type" content="text/html; charset=utf8" >--> <font size="+1" >/org/openbmc/settings/host0 provides the dbus properties that are settable via org.freedesktop.DBus.properties.Set.<br>The properties are treated as user settings and are consumed by respective daemons by having a signal handler registered for PropertyChanged method.<br><br>The challenge at the hand is "How to make sure the users that set the property are choosing a valid value".<br><br>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.<br><br>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.<br><br>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.<br><br>So the solution what I have at the moment is to<br><br>1) Disable the property set via freedesktop<br>2) Introduce a custom Setter "org.openbmc.Settings.Host.Set" which can do the job of validating the inputs also.<br><br>Please let me know if there are better approaches.<br><br>Thanks.<br><br>Vishwanatha Subbanna.</font>
<div><font size="2" face="Default Monospace,Courier New,Courier,monospace" >_______________________________________________<br>openbmc mailing list<br>openbmc@lists.ozlabs.org<br><a href="https://lists.ozlabs.org/listinfo/openbmc" target="_blank" >https://lists.ozlabs.org/listinfo/openbmc</a></font></div></blockquote>
<div dir="ltr" > </div></div><BR>