[Telepathy-commits] [telepathy-gabble/master] Tubes: check for Localhost access control list only for Unix sockets

Alban Crequy alban.crequy at collabora.co.uk
Tue Oct 28 07:50:19 PDT 2008


---
 src/tube-stream.c   |    3 ++-
 src/tubes-channel.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/tube-stream.c b/src/tube-stream.c
index 7a58aee..89ff857 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -2082,7 +2082,8 @@ gabble_tube_stream_accept_stream_tube (GabbleSvcChannelTypeStreamTube *iface,
       return;
     }
 
-  if (access_control != TP_SOCKET_ACCESS_CONTROL_LOCALHOST)
+  if (address_type != TP_SOCKET_ADDRESS_TYPE_UNIX &&
+      access_control != TP_SOCKET_ACCESS_CONTROL_LOCALHOST)
     {
       GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
           "Only the Localhost access control method is supported for Unix"
diff --git a/src/tubes-channel.c b/src/tubes-channel.c
index b8d8e48..56d5392 100644
--- a/src/tubes-channel.c
+++ b/src/tubes-channel.c
@@ -1929,7 +1929,8 @@ gabble_tubes_channel_accept_stream_tube (TpSvcChannelTypeTubes *iface,
       return;
     }
 
-  if (access_control != TP_SOCKET_ACCESS_CONTROL_LOCALHOST)
+  if (address_type != TP_SOCKET_ADDRESS_TYPE_UNIX &&
+      access_control != TP_SOCKET_ACCESS_CONTROL_LOCALHOST)
     {
       GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
           "Only the Localhost access control method is supported for Unix"
-- 
1.5.6.5




More information about the Telepathy-commits mailing list