dbus2 / zbus

Rust D-Bus crate.
Other
319 stars 70 forks source link

🚑️ zb: Server should handle FDs received during handshake #815

Closed zeenix closed 1 month ago

zeenix commented 1 month ago

If the client pipelines the handshake or is super fast to send the first message after the handshake, the server may receive FDs while still reading the handshake commands from the client. This is not possible to happen if the server is a bus impl but can happen in case of a pure p2p server.

We fix this by not erroring out on receiving FDs from the socket during the handshake but instead storing them in a list and processing them later when we receive/process the associated message.

Unfortunately, this requires an API break but given that there is no way to fix this without an API break and it's extremely unlikely that anyone is using/implementing these brand new low-level trait methods in question, directly, I think it's OK.

Fixes #813.