On Thu, Feb 3, 2011 at 8:42 AM, Dan Williams <span dir="ltr">&lt;<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, 2011-02-01 at 18:45 +0200, Jouni Malinen wrote:<br>
&gt; On Wed, Jan 05, 2011 at 12:08:02PM +0200, Tomasz Bursztyka wrote:<br>
&gt; &gt; &quot;psk&quot; field, in set_network_properties(), was always getting quoted even when<br>
&gt; &gt; containing a raw key (64 characters length representing the hexadecimal value<br>
&gt; &gt; of the raw key).<br>
&gt;<br>
&gt; Dan described the design here and it sounds reasonable to allow this as<br>
&gt; an alternative approach. However, there is something here that looks a<br>
&gt; bit odd to me..<br>
&gt;<br>
&gt; &gt; @@ -273,11 +286,12 @@ static DBusMessage * set_network_properties(DBusMessage *message,<br>
&gt; &gt;             } else if (entry.type == DBUS_TYPE_STRING) {<br>
&gt; &gt; -                   if (should_quote_opt(entry.key)) {<br>
&gt; &gt; -                           size = os_strlen(entry.str_value);<br>
&gt; &gt; -                           if (size &lt;= 0)<br>
&gt; &gt; -                                   goto error;<br>
&gt; &gt; +                   size = os_strlen(entry.str_value);<br>
&gt; &gt; +                   if (size &lt;= 0)<br>
&gt; &gt; +                           goto error;<br>
&gt; &gt;<br>
&gt; &gt; +                   if (should_quote_opt(entry.key, size,<br>
&gt; &gt; +                                        entry.str_value)) {<br>
&gt;<br>
&gt; Why is size == 0 an error? I&#39;m not sure it was correct with the previous<br>
&gt; quote case either, but now any use of DBUS_TYPE_STRING would trigger an<br>
&gt; error if the string is empty. There are number of configuration<br>
&gt; parameters for which an empty string is a valid value. Am I missing<br>
&gt; something or how is this supposed to work for such cases?<br>
<br>
</div>That wasn&#39;t something I&#39;d recognized originally; what are those<br>
properties and what&#39;s the motivation for them?  Are these things where<br>
just the presence of the property is important, but the actual value<br>
isn&#39;t know at this time, or...?<br><font class="Apple-style-span" color="#888888"><br></font></blockquote><div><br></div><div>This seems to have been dropped.  The raw PMK fix that triggered this exchange never got committed and is useful so can we resolve the issue with zero-length strings?</div>
<div><br></div><div>-Sam </div></div>