NTLMv2 on Samba-3.0.3pre2

Andrew Bartlett abartlet at samba.org
Mon Apr 19 13:11:54 GMT 2004


On Mon, Apr 19, 2004 at 03:04:36PM +0200, Jianliang Lu wrote:
> The patches for NTLMv2 on cvs for 3.0.2a were ok, but now on 3.0.3pre2 we 
> have the contradiction: while the "ntlm_password_check" checked the NTLMv2 
> password without/with domain "uppercased" using "smb_pwd_check_ntlmv2", 
> the "ntlmssp_set_domain" passed the domain always in uppercase! This will 
> cause the logon failure ("WRONG PASSWORD") from XP when you type the domain 
> name not in uppercase (join domain, net use ...).
> 
> FIXME:
> --- samba-3.0.3pre2/source/libsmb/ntlmssp.c.orig    Thu Apr 15 15:25:26 2004
> +++ samba-3.0.3pre2/source/libsmb/ntlmssp.c Mon Apr 19 14:35:21 2004
> @@ -170,7 +170,7 @@
>  {
>     /* Possibly make our NTLMv2 client more robust by always having
>        an uppercase domain */
> -   ntlmssp_state->domain = talloc_strdup_upper(ntlmssp_state->mem_ctx, 
> domain);
> +   ntlmssp_state->domain = talloc_strdup(ntlmssp_state->mem_ctx, domain);
>     if (!ntlmssp_state->domain) {
>         return NT_STATUS_NO_MEMORY;
>     }

Bugger.  I forgot that this code is used on the server-side.  I'm
happy to see this applied.  (Provided that you also remove the
now-bogus comment).  I'm just not in a position to actually test it
this time...

Andrew Bartlett


More information about the samba-technical mailing list