[spice-gtk v2] sasl: fix SASL GSSAPI by allowing NULL username

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alexander Bokovoy <abokovoy@xxxxxxxxxx>

SASL GSSAPI module will try to negotiate authentication based on the
credentials in the default credentials cache. It does not matter if
SPICE knows username or not as SASL negotiation will pass through the
discovered name from the GSSAPI module.

Signed-off-by: Alexander Bokovoy <abokovoy@xxxxxxxxxx>
Acked-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
Sending the patch to the ML for the record.
I already ACKed the patch and anyone objects I'll push it Tomorrow.
---
 src/spice-channel.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/spice-channel.c b/src/spice-channel.c
index c6e548d..0eb0e61 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -1387,11 +1387,10 @@ spice_channel_gather_sasl_credentials(SpiceChannel *channel,
         switch (interact[ninteract].id) {
         case SASL_CB_AUTHNAME:
         case SASL_CB_USER:
-            if (spice_session_get_username(c->session) == NULL)
-                return FALSE;
-
-            interact[ninteract].result =  spice_session_get_username(c->session);
-            interact[ninteract].len = strlen(interact[ninteract].result);
+            if (spice_session_get_username(c->session) != NULL) {
+                interact[ninteract].result =  spice_session_get_username(c->session);
+                interact[ninteract].len = strlen(interact[ninteract].result);
+            }
             break;
 
         case SASL_CB_PASS:
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]