cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: [PATCH] smb/cifs

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Mon, 10 Nov 2014 22:57:54 +0000

On Mon, 10 Nov 2011, Nagel, Bill wrote:

> Once the patches are merged, I will submit another set for docs and tests.

Whilst the test cases can wait until afterwards, could you please submit a patch for any documentation updates before I push your changes?

This will allow me to test your patches with the curl command line tool manually.

> I believe smbclient allows forward slashes, which is why I supported it, but I
> don't mind only supporting backslash.

It seems like a good enough argument to maintain compatibility with another tool, in my opinion, especially such a widely used one as smbclient.

However, and this is more for my own curiosity, but I couldn’t find any mention of it in the manpages :(

> I would prefer to use types that are explicit about their size since this is a
> binary protocol, whether they are stdint types or something else.

I don't want to sound funny about this, but you might prefer to use these types (and if it was my own code outside of this project then I would as well), however the majority of curl is C89 compliant and we try to keep it as such. I appreciate the typedefs you introduce maintains portability but that’s not how we do things around here.

The only instance, that I'm aware of, where we're not C89 compliant is in some of the HTTP/2 code and, as far as I know, that's only because we integrate with a third party library that is C99 compliant.

Please see the following guide regarding portability:

http://curl.haxx.se/dev/internals.html

> > 5) If I build without NTLM support (either a) without an SSL/crypto
> > library, b) without Windows SSPI or c) I define
> > CURL_DISABLE_CRYPTO_AUTH) then I also received the same unresolved external function warnings.
>
> I believe a #error in curl_ntlm_core.c will catch this.

I'm sorry but this code needs to compile when NTLM support is not available - there are a lot of platforms out there that we compile for where NTLM may not be available because of one of the above scenarios. As such we should add the following to smb.[c|h] and such like so that is compiles under such circumstances:

#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM)

Please see curl_ntlm_wb.c and instances of where Curl_ntlm_wb_cleanup() is called for an example of this ;-)

Kind Regards

Steve

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