simple UNIX_FD pass test?

Felipe Gasper felipe at felipegasper.com
Thu Nov 15 21:33:08 UTC 2018


Yeah, I just ended up slugging through the work of setting up sender and receiver in Perl.

I’m about to push the updated version, probably either today or tomorrow.

In case anyone wants to try it out:
https://metacpan.org/pod/release/FELIPE/Protocol-DBus-0.05-TRIAL2/lib/Protocol/DBus.pm

-FG

> On Nov 15, 2018, at 12:23 PM, David Sommerseth <dbus at lists.topphemmelig.net> wrote:
> 
> On 12/11/2018 16:18, Felipe Gasper wrote:
>> Hello,
>> 
>> 	I’m working on support for unix FD passing in Protocol::DBus.
>> 
>> 	What would be a simple way to test my implementation? Is there maybe a built-in (or systemd) method call that always returns unix FDs or some such?
>> 
>> 	Thank you!
> 
> I've used the unit test code available in glib2, both to better understand and
> to test passing of FDs.
> 
> Client/caller side implementation:
> <https://gitlab.gnome.org/GNOME/glib/blob/master/gio/tests/gdbus-example-unix-fd-client.c#L14>
> 
> Server/service side implementation:
> <https://gitlab.gnome.org/GNOME/glib/blob/master/gio/tests/gdbus-example-server.c#L123>
> 
> In my project (openvpn3-linux) we're using glib2 for the D-Bus implementation,
> so for us these implementations was fairly straight forward to adopt; even
> though we're using slightly different and more high-level functions [IIRC: 0,
> 1].  But our own unit tests works well against the glib2 unit tests, so we
> believe we managed to nail it :)  (We're just in the middle of cleaning up our
> code using this feature, so it isn't public just yet - but most likely next
> week or so)
> 
> [0]
> <https://developer.gnome.org/gio/stable/GDBusConnection.html#g-dbus-connection-call-with-unix-fd-list-sync>
> [1]
> <https://developer.gnome.org/gio/stable/GDBusMessage.html#g-dbus-message-get-unix-fd-list>
> 
> 
> -- 
> kind regards,
> 
> David Sommerseth
> OpenVPN Inc
> 



More information about the dbus mailing list