On Thu, Feb 3, 2011 at 8:42 AM, 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 class="im">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 wrote:<br>
> > "psk" field, in set_network_properties(), was always getting quoted even when<br>
> > containing a raw key (64 characters length representing the hexadecimal value<br>
> > of the raw key).<br>
><br>
> Dan described the design here and it sounds reasonable to allow this as<br>
> an alternative approach. However, there is something here that looks a<br>
> bit odd to me..<br>
><br>
> > @@ -273,11 +286,12 @@ static DBusMessage * set_network_properties(DBusMessage *message,<br>
> > } else if (entry.type == DBUS_TYPE_STRING) {<br>
> > - if (should_quote_opt(entry.key)) {<br>
> > - size = 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>
> Why is size == 0 an error? I'm not sure it was correct with the previous<br>
> quote case either, but now any use of DBUS_TYPE_STRING would trigger an<br>
> error if the string is empty. There are number of configuration<br>
> parameters for which an empty string is a valid value. Am I missing<br>
> something or how is this supposed to work for such cases?<br>
<br>
</div>That wasn't something I'd recognized originally; what are those<br>
properties and what's the motivation for them? Are these things where<br>
just the presence of the property is important, but the actual value<br>
isn'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>