diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2012-03-30 15:20:53 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2012-03-30 15:32:46 +0100 |
commit | 5421f1432ed21a198e00aa708dc00e8f032ec488 (patch) | |
tree | 390bd97e4e0e4f1e0f6397b601470c890314a4f4 | |
parent | ecbbb72e7d11951a13514151cdf16112e09e608c (diff) | |
download | telepathy-glib-5421f1432ed21a198e00aa708dc00e8f032ec488.tar.gz |
DBusTubeChannel: always use CREDENTIALS for now
Unlike with stream tubes, I don't think this is something which tp-glib
can decide for you. CREDENTIALS means “Use D-Bus's normal SASL
handshaking”; LOCALHOST means “turn off the same-user restriction and
optionally enable the ANONYMOUS mechanism if the socket really is only
available to local users” or something.
(To be honest, it's not obvious how an application can decide what it
wants without being patched. I think this functionality exists for
Sugar's benefit, where the CMs are run as different users to the
applications; the applications can only talk to them, IIRC, because the
session bus has authentication turned off.)
-rw-r--r-- | telepathy-glib/dbus-tube-channel.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/telepathy-glib/dbus-tube-channel.c b/telepathy-glib/dbus-tube-channel.c index 2967fdbe9..70055e232 100644 --- a/telepathy-glib/dbus-tube-channel.c +++ b/telepathy-glib/dbus-tube-channel.c @@ -549,10 +549,12 @@ proxy_prepare_offer_cb (GObject *source, g_object_notify (G_OBJECT (self), "parameters"); - /* TODO: use TP_SOCKET_ACCESS_CONTROL_CREDENTIALS if supported */ - + /* TODO: provide a way to use TP_SOCKET_ACCESS_CONTROL_LOCALHOST if you're in + * an environment where you need to disable authentication. tp-glib can't + * guess this for you. + */ tp_cli_channel_type_dbus_tube_call_offer (TP_CHANNEL (self), -1, - self->priv->parameters, TP_SOCKET_ACCESS_CONTROL_LOCALHOST, + self->priv->parameters, TP_SOCKET_ACCESS_CONTROL_CREDENTIALS, dbus_tube_offer_cb, NULL, NULL, G_OBJECT (self)); out: @@ -664,10 +666,12 @@ proxy_prepare_accept_cb (GObject *source, return; } - /* TODO: use TP_SOCKET_ACCESS_CONTROL_CREDENTIALS if supported */ - + /* TODO: provide a way to use TP_SOCKET_ACCESS_CONTROL_LOCALHOST if you're in + * an environment where you need to disable authentication. tp-glib can't + * guess this for you. + */ tp_cli_channel_type_dbus_tube_call_accept (TP_CHANNEL (self), -1, - TP_SOCKET_ACCESS_CONTROL_LOCALHOST, dbus_tube_accept_cb, + TP_SOCKET_ACCESS_CONTROL_CREDENTIALS, dbus_tube_accept_cb, NULL, NULL, G_OBJECT (self)); } |