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