Add partial support for ISC_REQ_ALLOCATE_MEMORY in the NTLM security provider

Dmitry Timoshkov dmitry at codeweavers.com
Thu Apr 27 06:53:19 CDT 2006


Hello,

please apply after secur32 test fixes.

Changelog:
    Add partial support for ISC_REQ_ALLOCATE_MEMORY in the NTLM security
    provider.

--- cvs/hq/wine/dlls/secur32/ntlm.c	2006-04-27 20:39:41.000000000 +0900
+++ wine/dlls/secur32/ntlm.c	2006-04-27 01:13:19.000000000 +0900
@@ -436,10 +436,6 @@ static SECURITY_STATUS SEC_ENTRY ntlm_In
                 TRACE("According to a MS whitepaper pszTargetName is ignored.\n");
             }
             /* Handle all the flags */
-            if(fContextReq & ISC_REQ_ALLOCATE_MEMORY)
-            {
-                FIXME("InitializeSecurityContext(): ISC_REQ_ALLOCATE_MEMORY stub\n");
-            }
             if(fContextReq & ISC_REQ_CONFIDENTIALITY)
             {
                 FIXME("InitializeSecurityContext(): ISC_REQ_CONFIDENTIALITY stub\n");
@@ -547,6 +543,16 @@ static SECURITY_STATUS SEC_ENTRY ntlm_In
 
                 /* put the decoded client blob into the out buffer */
 
+                if (fContextReq & ISC_REQ_ALLOCATE_MEMORY)
+                {
+                    if (pOutput)
+                    {
+                        pOutput->cBuffers = 1;
+                        pOutput->pBuffers[0].pvBuffer = SECUR32_ALLOC(bin_len);
+                        pOutput->pBuffers[0].cbBuffer = bin_len;
+                    }
+                }
+
                 if (!pOutput || !pOutput->cBuffers || pOutput->pBuffers[0].cbBuffer < bin_len)
                 {
                     TRACE("out buffer is NULL or has not enough space\n");
@@ -643,6 +649,16 @@ static SECURITY_STATUS SEC_ENTRY ntlm_In
 
                 /* put the decoded client blob into the out buffer */
 
+                if (fContextReq & ISC_REQ_ALLOCATE_MEMORY)
+                {
+                    if (pOutput)
+                    {
+                        pOutput->cBuffers = 1;
+                        pOutput->pBuffers[0].pvBuffer = SECUR32_ALLOC(bin_len);
+                        pOutput->pBuffers[0].cbBuffer = bin_len;
+                    }
+                }
+
                 if (!pOutput || !pOutput->cBuffers || pOutput->pBuffers[0].cbBuffer < bin_len)
                 {
                     TRACE("out buffer is NULL or has not enough space\n");





More information about the wine-patches mailing list