I've been playing with the gsasl backend a bit lately, trying to get the
Kerberos (GSSAPI) backend to work.

The attached patch at least gets jabberd to offer GSSAPI authentication
and makes it successfully complete the first couple of steps in SASL.
For some reason it doesn't send the last response in the SASL as
<success/> though but as <challenge/>. I haven't looked into why this is
yet. 

Cheers,

Jelmer
-- 
Jelmer Vernooij <[EMAIL PROTECTED]> - http://samba.org/~jelmer/
Jabber: [EMAIL PROTECTED]
=== modified file 'sx/sasl_gsasl.c'
--- sx/sasl_gsasl.c	2008-07-09 06:55:15 +0000
+++ sx/sasl_gsasl.c	2008-08-07 04:34:52 +0000
@@ -620,6 +620,22 @@
             }
             return GSASL_NEEDS_MORE;
 
+        case GSASL_SERVICE:
+            gsasl_property_set(sd, GSASL_SERVICE, "xmpp");
+            return GSASL_OK;
+
+        case GSASL_HOSTNAME:
+            { 
+                char hostname[256];
+                /* get hostname */
+                hostname[0] = '\0';
+                gethostname(hostname, 256);
+                hostname[255] = '\0';
+
+                gsasl_property_set(sd, GSASL_HOSTNAME, hostname);
+           }
+           return GSASL_OK;
+
         case GSASL_VALIDATE_SIMPLE:
             /* GSASL_AUTHID, GSASL_AUTHZID, GSASL_PASSWORD */
             assert((ctx->cb != NULL));
@@ -634,6 +650,12 @@
             else
                 return GSASL_AUTHENTICATION_ERROR;
 
+        case GSASL_VALIDATE_GSSAPI:
+            /* GSASL_AUTHZID, GSASL_GSSAPI_DISPLAY_NAME */
+            creds.authzid = gsasl_property_fast(sd, GSASL_AUTHZID);
+            if(!creds.authzid) return GSASL_NO_AUTHZID;
+            return GSASL_OK;
+
         case GSASL_VALIDATE_ANONYMOUS:
             /* GSASL_ANONYMOUS_TOKEN */
             creds.authnid = gsasl_property_fast(sd, GSASL_ANONYMOUS_TOKEN);

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to