[Spice-devel] [PATCH 1/2] client/server: add missing smartchannel channel security handling

Alon Levy alevy at redhat.com
Tue Jan 25 06:58:09 PST 2011


The name to channel id mapping for the smartcard channel is missing,
add it in client and server.
---
 client/application.cpp |    6 ++++++
 server/reds.c          |    3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/client/application.cpp b/client/application.cpp
index d865e84..664449d 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -1914,6 +1914,9 @@ bool Application::set_channels_security(CmdLineParser& parser, bool on, char *va
     channels_names["playback"] = SPICE_CHANNEL_PLAYBACK;
     channels_names["record"] = SPICE_CHANNEL_RECORD;
     channels_names["tunnel"] = SPICE_CHANNEL_TUNNEL;
+#ifdef USE_SMARTCARD
+    channels_names["smartcard"] = SPICE_CHANNEL_SMARTCARD;
+#endif
 
     if (!strcmp(val, "all")) {
         if ((val = parser.next_argument())) {
@@ -2073,6 +2076,9 @@ bool Application::set_enable_channels(CmdLineParser& parser, bool enable, char *
     channels_names["playback"] = SPICE_CHANNEL_PLAYBACK;
     channels_names["record"] = SPICE_CHANNEL_RECORD;
     channels_names["tunnel"] = SPICE_CHANNEL_TUNNEL;
+#ifdef USE_SMARTCARD
+    channels_names["smartcard"] = SPICE_CHANNEL_SMARTCARD;
+#endif
 
     if (!strcmp(val, "all")) {
         if ((val = parser.next_argument())) {
diff --git a/server/reds.c b/server/reds.c
index 14aad32..7535b95 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3019,6 +3019,9 @@ __visible__ int spice_server_set_channel_security(SpiceServer *s, const char *ch
         [ SPICE_CHANNEL_PLAYBACK ] = "playback",
         [ SPICE_CHANNEL_RECORD   ] = "record",
         [ SPICE_CHANNEL_TUNNEL   ] = "tunnel",
+#ifdef USE_SMARTCARD
+        [ SPICE_CHANNEL_SMARTCARD] = "smartcard",
+#endif
     };
     int i;
 
-- 
1.7.3.5



More information about the Spice-devel mailing list