summaryrefslogtreecommitdiffstats
path: root/server/inputs_channel.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-03-14 17:15:55 +0100
committerHans de Goede <hdegoede@redhat.com>2013-03-15 09:44:50 +0100
commit8d44aa032892ea6643925fa7485d9af32853e127 (patch)
treea070355d985e492d62bb2b8924c6a2b3b6272a0e /server/inputs_channel.c
parent0711a4a464ca90f5ac34ba1363a8c4916d415103 (diff)
downloadspice-8d44aa032892ea6643925fa7485d9af32853e127.tar.gz
spice-8d44aa032892ea6643925fa7485d9af32853e127.tar.xz
spice-8d44aa032892ea6643925fa7485d9af32853e127.zip
inputs-channel: Handle printing of insecure keyboard notify
This is clearly something which should be handled in the inputs_channel code, rather then having a special case for it in the generic channel handling code in reds.c. Moving it here also fixes the TODO we had on only sending this message to new clients. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'server/inputs_channel.c')
-rw-r--r--server/inputs_channel.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/inputs_channel.c b/server/inputs_channel.c
index 1a64e2dd..c9c79be4 100644
--- a/server/inputs_channel.c
+++ b/server/inputs_channel.c
@@ -37,6 +37,7 @@
#include "red_common.h"
#include "reds.h"
#include "red_channel.h"
+#include "main_channel.h"
#include "inputs_channel.h"
#include "migration_protocol.h"
@@ -521,6 +522,11 @@ static void inputs_connect(RedChannel *channel, RedClient *client,
spice_assert(g_inputs_channel);
spice_assert(channel == &g_inputs_channel->base);
+ if (!stream->ssl) {
+ main_channel_client_push_notify(red_client_get_main(client),
+ "keyboard channel is insecure");
+ }
+
spice_printerr("inputs channel client create");
icc = (InputsChannelClient*)red_channel_client_create(sizeof(InputsChannelClient),
channel,