[PATCH 4/4] secur32: Fix NTLM's InitializeSecurityContextA/W to be flexible with the index of the token buffer in both the input and output buffer descriptions.

Kai Blin kai.blin at gmail.com
Fri May 25 00:24:13 CDT 2007

On Thursday 24 May 2007 21:04:47 Robert Shearman wrote:

> This patch allows native rpcrt4.dll to use NTLM authentication.

Nice :) And it looks like it wasn't that much work to fix my code ;)

>              TRACE("pInput->pBuffers[0].cbBuffer is: %ld\n",
> -                    pInput->pBuffers[0].cbBuffer);
> +                    pInput->pBuffers[input_token_idx].cbBuffer);
>              ret = SEC_E_INVALID_TOKEN;

If you change the index of the token buffer, could you please fix the trace 

> +        WARN("no SECBUFFER_TOKEN buffer could be found\n");
> +        ret = SEC_E_BUFFER_TOO_SMALL;
> +        goto isc_end;
>      }

Is that intentional? According to the developer's guide, "[y]ou should report 
a warning when something unwanted happens, and the function cannot deal with 
the condition." 
This is something the calling application screwed up, so I think a TRACE 
should be sufficient.


Kai Blin
WorldForge developer  http://www.worldforge.org/
Wine developer        http://wiki.winehq.org/KaiBlin
Samba team member     http://us1.samba.org/samba/team/
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070525/0f42c28c/attachment.pgp

More information about the wine-devel mailing list