cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Request to review the code changes for NTLMv2 Support in Curl

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Wed, 29 Jan 2014 20:49:28 +0000

On Wed, 29 Jan 2014, Steve Holme wrote:
 
> > Wanted to get a confirmation from you if NTLMv2 support will
> > be released with libcurl 7.36.0, or do we see it coming in a later
> > release
>
> I have your patch and the patches I posted here all combined and
> ready to go along with some of my test harness changes so should
> be able to push them as soon as 7.35 is out the door.

Guess who didn't see Daniel's email from this morning about the 7.35 release
before they emailed pushing after 7.35 being out the door ;-)

I have now pushed the changes - as well as a couple of follow up commits.
All the copyright and minor tidy up changes that I did have been merged into
Prash's commit.

Note: All NTLM tests *should* now fail as the code curl generates is a
NTLMv2 type-3 message rather than a v1 - obviously curl will generate a v1
message if the server only supports that and we should add a test case for
that ;-)

As I don't run the test suite here I will fix up the NTLM tests after they
next run through the auto builds - so a) I know which tests I need to fix
and b) what I need to modify the type-3 response to. I have added code to
the time stamping for the test suite to be 01/01/1970 - If anyone has any
different views then please let me know. For example: Curl's epoc (birthday)
;-)

I also have a quick question regarding Winbind support as a) I think
Curl_http_ntlm_cleanup() in curl_ntlm.c can be cleaned up a little and b)
I'm only familiar with the SSPI and native message generation at present. In
short I don't think the (void)conn is needed now and the ifndef
USE_WINDOWS_SSPI code to release the target info can be merged into the
#ifdef above - my question is this though...

Can curl still generated native NLTM messages if Winbind support is enabled?
For example should the code read:

#ifdef USE_WINDOWS_SSPI
  Curl_ntlm_sspi_cleanup(&conn->ntlm);
  Curl_ntlm_sspi_cleanup(&conn->proxyntlm);
#elif defined(NTLM_WB_ENABLED)
  Curl_ntlm_wb_cleanup(conn);
#else
  Curl_safefree(conn->ntlm.target_info);
  conn->ntlm.target_info_len = 0;
#endif

Or...

#ifdef USE_WINDOWS_SSPI
  Curl_ntlm_sspi_cleanup(&conn->ntlm);
  Curl_ntlm_sspi_cleanup(&conn->proxyntlm);
#else
  Curl_safefree(conn->ntlm.target_info);
  conn->ntlm.target_info_len = 0;

#if defined(NTLM_WB_ENABLED)
  Curl_ntlm_wb_cleanup(conn);
#endif

#endif /* USE_WINDOWS_SSPI */

The first assumes that curl cannot generate native messages if Winbind is
enabled.

Cheers

Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-29