Open
Conversation
A dbus connection setup is always special. It uses an ASCII line based protocol to authenticate via SASL. Once that setup is done, normal DBus messages are sent. Sadly, the line-based protocol does not allow us to know message sizes up-front. Hence, we have a buffered reader. Once the authentication phase is done, we use the trailing buffer data as input for the first message. From them on, we always read exactly the required sizes from the wire. Now if the first message in the trailing SASL buffer contains file-descriptors, we must be able to properly assign them to the correct message. This commit adds a test case for exactly that. This sd-bus does not allow us to have full control over the wire scheduling, we have to hand-craft some messages here to trigger those code paths.
Contributor
Author
|
The CI-fails here on purpose, since that's the point of the PR. |
Member
|
Hmm, should we try to revive this? @dvdhrm can you update this if it's still relevant? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A dbus connection setup is always special. It uses an ASCII line based
protocol to authenticate via SASL. Once that setup is done, normal DBus
messages are sent. Sadly, the line-based protocol does not allow us to
know message sizes up-front. Hence, we have a buffered reader.
Once the authentication phase is done, we use the trailing buffer data
as input for the first message. From then on, we always read exactly the
required sizes from the wire.
Now if the first message in the trailing SASL buffer contains
file-descriptors, we must be able to properly assign them to the
correct message. This commit adds a test case for exactly that. This
sd-bus does not allow us to have full control over the wire scheduling,
we have to hand-craft some messages here to trigger those code paths.
This test currently fails, since sd-bus is broken. So lets delay this until we fixed it.