[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Problem with SASL and GSSAPI
On Sat, Mar 17, 2001 at 04:17:36PM +0100, Turbo Fredriksson wrote:
> I _THINK_ this is the way it's supposed to work... It depends if you have
> the same bug in SASL as I do (I haven't found a fix for that yet).
You are talking about this? (It might not apply cleanly)
diff -u -r cyrus-sasl-1.5.24.orig/plugins/gssapi.c cyrus-sasl-1.5.24/plugins/gssapi.c
--- cyrus-sasl-1.5.24.orig/plugins/gssapi.c Fri Jul 21 04:06:52 2000
+++ cyrus-sasl-1.5.24/plugins/gssapi.c Sun Dec 17 15:19:31 2000
@@ -592,6 +594,7 @@
gss_buffer_desc name_without_realm;
gss_name_t without = NULL;
int equal;
+ char *realm = NULL;
name_token.value = NULL;
name_without_realm.value = NULL;
@@ -625,7 +623,8 @@
without the realm and see if it's the same id (i.e.
tmartin == tmartin@ANDREW.CMU.EDU. If this is the case we just want
to return the id (i.e. just "tmartin: */
- if (strchr((char *)name_token.value, (int) '@')!=NULL)
+ realm = strchr((char *)name_token.value, (int) '@');
+ if (realm != NULL)
{
name_without_realm.value = (char *) params->utils->malloc(strlen(name_token.value)+1);
if (name_without_realm.value == NULL) return SASL_NOMEM;
@@ -687,6 +686,14 @@
strcpy(oparams->authid, name_token.value);
}
+ if (realm != NULL)
+ {
+ realm++; /* skip '@' */
+ oparams->realm = (char *) params->utils->malloc(strlen(realm)+1);
+ if (oparams->realm == NULL) return SASL_NOMEM;
+ strcpy(oparams->realm, realm);
+ }
+
if (name_token.value)
params->utils->free(name_token.value);
if (name_without_realm.value)
Gabor
--
Gabor Gombas Eotvos Lorand University
E-mail: gombasg@inf.elte.hu Hungary