gsasl-commit
[Top][All Lists]
Advanced

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

CVS gsasl/lib/ntlm


From: gsasl-commit
Subject: CVS gsasl/lib/ntlm
Date: Tue, 30 Nov 2004 23:18:54 +0100

Update of /home/cvs/gsasl/lib/ntlm
In directory dopio:/tmp/cvs-serv7748

Modified Files:
        ntlm.c 
Log Message:
Set domain field to GSASL_REALM property value, because some servers
appear to need non-empty domain fields, reported by Martin Lambers
<address@hidden>.


--- /home/cvs/gsasl/lib/ntlm/ntlm.c     2004/11/07 17:22:24     1.13
+++ /home/cvs/gsasl/lib/ntlm/ntlm.c     2004/11/30 22:18:54     1.14
@@ -67,11 +67,14 @@
   tSmbNtlmAuthRequest request;
   tSmbNtlmAuthChallenge challenge;
   tSmbNtlmAuthResponse response;
-  /* XXX create callback for domain? Doesn't seem to be needed by servers */
-  char *domain = NULL;
-  const char *password, *authid;
+  const char *domain = gsasl_property_get (sctx, GSASL_REALM);
+  const char *authid = gsasl_property_get (sctx, GSASL_AUTHID);
+  const char *password;
   int res;
 
+  if (!authid)
+    return GSASL_NO_AUTHID;
+
   switch (state->step)
     {
     case 0:
@@ -79,10 +82,6 @@
          if (input_len != 1 && *input != '+')
          return GSASL_MECHANISM_PARSE_ERROR; */
 
-      authid = gsasl_property_get (sctx, GSASL_AUTHID);
-      if (!authid)
-       return GSASL_NO_AUTHID;
-
       buildSmbNtlmAuthRequest (&request, authid, domain);
 
       *output_len = SmbLength (&request);
@@ -110,10 +109,6 @@
       if (!password)
        return GSASL_NO_PASSWORD;
 
-      authid = gsasl_property_get (sctx, GSASL_AUTHID);
-      if (!authid)
-       return GSASL_NO_AUTHID;
-
       buildSmbNtlmAuthResponse (&challenge, &response, authid, password);
 
       *output_len = SmbLength (&response);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]