On Mon, Apr 4, 2011 at 7:16 PM, 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><div></div><div class="h5">On Thu, 2011-03-31 at 13:48 -0700, Sam Leffler wrote:<br>
&gt; On Thu, Feb 3, 2011 at 8:42 AM, Dan Williams &lt;<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>&gt; wrote:<br>
&gt;         On Tue, 2011-02-01 at 18:45 +0200, Jouni Malinen wrote:<br>
&gt;         &gt; On Wed, Jan 05, 2011 at 12:08:02PM +0200, Tomasz Bursztyka<br>
&gt;         wrote:<br>
&gt;         &gt; &gt; &quot;psk&quot; field, in set_network_properties(), was always<br>
&gt;         getting quoted even when<br>
&gt;         &gt; &gt; containing a raw key (64 characters length representing<br>
&gt;         the hexadecimal value<br>
&gt;         &gt; &gt; of the raw key).<br>
&gt;         &gt;<br>
&gt;         &gt; Dan described the design here and it sounds reasonable to<br>
&gt;         allow this as<br>
&gt;         &gt; an alternative approach. However, there is something here<br>
&gt;         that looks a<br>
&gt;         &gt; bit odd to me..<br>
&gt;         &gt;<br>
&gt;         &gt; &gt; @@ -273,11 +286,12 @@ static DBusMessage *<br>
&gt;         set_network_properties(DBusMessage *message,<br>
&gt;         &gt; &gt;             } else if (entry.type == DBUS_TYPE_STRING) {<br>
&gt;         &gt; &gt; -                   if (should_quote_opt(entry.key)) {<br>
&gt;         &gt; &gt; -                           size =<br>
&gt;         os_strlen(entry.str_value);<br>
&gt;         &gt; &gt; -                           if (size &lt;= 0)<br>
&gt;         &gt; &gt; -                                   goto error;<br>
&gt;         &gt; &gt; +                   size = os_strlen(entry.str_value);<br>
&gt;         &gt; &gt; +                   if (size &lt;= 0)<br>
&gt;         &gt; &gt; +                           goto error;<br>
&gt;         &gt; &gt;<br>
&gt;         &gt; &gt; +                   if (should_quote_opt(entry.key, size,<br>
&gt;         &gt; &gt; +                                        entry.str_value))<br>
&gt;         {<br>
&gt;         &gt;<br>
&gt;         &gt; Why is size == 0 an error? I&#39;m not sure it was correct with<br>
&gt;         the previous<br>
&gt;         &gt; quote case either, but now any use of DBUS_TYPE_STRING would<br>
&gt;         trigger an<br>
&gt;         &gt; error if the string is empty. There are number of<br>
&gt;         configuration<br>
&gt;         &gt; parameters for which an empty string is a valid value. Am I<br>
&gt;         missing<br>
&gt;         &gt; something or how is this supposed to work for such cases?<br>
&gt;<br>
&gt;<br>
&gt;         That wasn&#39;t something I&#39;d recognized originally; what are<br>
&gt;         those<br>
&gt;         properties and what&#39;s the motivation for them?  Are these<br>
&gt;         things where<br>
&gt;         just the presence of the property is important, but the actual<br>
&gt;         value<br>
&gt;         isn&#39;t know at this time, or...?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; This seems to have been dropped.  The raw PMK fix that triggered this<br>
&gt; exchange never got committed and is useful so can we resolve the issue<br>
&gt; with zero-length strings?<br>
<br>
</div></div>I&#39;m not sure I follow.  In what situations is a zero-length string<br>
useful as a property?  I&#39;m not saying it&#39;s not useful, I&#39;m just trying<br>
to figure out what problem this fix is trying to work around?</blockquote><div><br></div><div>I think this question is to Jouni regarding the original code that generated an error on zero-length strings.  I don&#39;t have an answer--am mostly trying to isolate that issue from the PMK change that we&#39;ve adopted for Chrome OS but which looks to have been dropped.</div>
<div><br></div><div>-Sam </div></div>