Disabling new D-Bus protocol features by default
Thiago Macieira
thiago at kde.org
Tue Nov 9 01:18:56 PST 2010
Em Terça-feira 09 Novembro 2010, às 09:07:43, Marcel Holtmann escreveu:
> Hi Thiago,
>
> > Maybe so, but that's not what we've done. Right now, we trust the daemon
> > and it does have logic to not send the new types. And on the client
> > side, the behaviour on seeing new things is to disconnect. Before we
> > talk about removing the daemon safeties, we need to fix the clients.
> >
> > I'm simply moving the control of the negotiation logic to the public.
>
> so how does a client sees the new types if it has to negotiate the
> support in the first place. I think the behavior of the client is
> actually correct. It gets unexpected data and decides to just
> disconnect.
The point is that, if the client isn't modified to tell the library that it
knows about the new types, the library will not negotiate the new feature with
the bus server. In turn, the bus server will not send the new types over the
connection.
> What are you trying to fix here?
The library giving bindings the new types without those bindings or apps
knowing about them.
> > You're asking that we fix all applications and all bindings that made the
> > assumption that they knew all types possible. You're also asking that no
> > one use an old, bundled version of libdbus-1.
>
> If a binding made the assumption it knew all data types, then that
> binding has an issue already right now. In the end D-Bus is a wire
> protocol and you have to treat it like that and handle unspecified data
> types.
You see, the library ALSO made that assumption. That's why it disconnects when
it receives an unknown new type. The wire protocol doesn't have any extension
mechanism, it's simply impossible to handle a new type gracefully. That's why
features had to be negotiated out of band,
Up until D-Bus 1.2 it was a safe assumption that there would be no new types,
because we hadn't found a way to extend the type system. Applications could
rely on the low-level library not giving them anything that they didn't know.
Now they can't. We're pulling the rug under these applications, some of which
are quite sensitive, due to the system bus.
If you guys don't think this is serious, I'll wash my hands...
> > If we don't apply this fix, then I think we must *immediately* make
> > libdbus-1 stop disconnecting when it receives new types from the bus. We
> > can't have both.
>
> How can libdbus-1 receive that unknown data type in the first place if
> it has not negotiated the support for it? Am I missing something obvious
> right now? Who is actually disconnecting who?
Point taken, I don't think this is necessary.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20101109/efcaa18b/attachment.pgp>
More information about the dbus
mailing list