-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: unix socket file descriptor support #64
Comments
Sure, if you send a pull request, I'll be happy to merge this feature. |
Dretch
added a commit
to Dretch/haskell-dbus
that referenced
this issue
Aug 10, 2023
rblaze
added a commit
that referenced
this issue
Aug 22, 2023
* Allow sending and receiving Unix file descriptors. Fixes issue #64 * Make file descriptor support backwards compatible. * Fix benchmarks. --------- Co-authored-by: Andrey Sverdlichenko <blaze@rusty.zone>
This is now implemented, thanks for merging and releasing @rblaze |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently file descriptors are just (de)serialized as regular integers. However, since file descriptors are an index into a per-process table, and d-bus normally operates between different processes, the file descriptors passed from one dbus client process will not normally make any sense on the receiving client process. Moreover this does not seem to be the way the dbus protocol is intended to be implemented.
The spec says that "...file descriptors need to be transferred via platform specific mechanism out-of-band. They must be sent at the same time as part of the message itself. They may not be sent before the first byte of the message itself is transferred or after the last byte of the message itself.".
In practice (i.e. the reference implementation), this seems to mean the following:
This ticket is to request that unix-socket-fd-passing be supported in haskell-dbus-client.
I'd be happy to implement this myself, if this meets with approval. I have some prototype code to prove it works, but this needs a lot of finishing / cleaning up.
The text was updated successfully, but these errors were encountered: