summaryrefslogtreecommitdiffstats
path: root/bus
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-04-24 04:38:27 +0200
committerLennart Poettering <lennart@poettering.net>2009-05-20 02:09:31 +0200
commitc200e0304d6f53a0fd47f524386b02b27c0c45f6 (patch)
tree2d78c7bb46d1ce81538c7c36cce948f170d933b1 /bus
parent89318bbeb4076d8d9de9831d69621fc1411760d3 (diff)
auth: add fd passing negotiation support
This adds two new directives to the auth protocol: NEGOTIATE_UNIX_FD is sent by the client after the authentication was sucessful, i.e. OK was received. AGREE_UNIX_FD is then sent by the server if it can do unix fd passing as well. ERROR is returned when the server cannot or is unwilling to do unix fd passing. This should be compatible with existing D-Bus implementations which will naturally return ERROR on NEGOTIATE_UNIX_FD.
Diffstat (limited to 'bus')
-rw-r--r--bus/dispatch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bus/dispatch.c b/bus/dispatch.c
index ca9a8433..8ed88dad 100644
--- a/bus/dispatch.c
+++ b/bus/dispatch.c
@@ -4791,6 +4791,11 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
if (!_dbus_close(two[0], &error))
_dbus_assert_not_reached("Failed to close pipe #2 ");
+ if (!(dbus_connection_can_send_type(foo, DBUS_TYPE_UNIX_FD)))
+ _dbus_assert_not_reached("Connection cannot do fd passing");
+
+ if (!(dbus_connection_can_send_type(bar, DBUS_TYPE_UNIX_FD)))
+ _dbus_assert_not_reached("Connection cannot do fd passing");
if (!dbus_connection_send (foo, m, NULL))
_dbus_assert_not_reached("Failed to send fds");