From 526603ff0520ed1371e4ee93f75a7597acb2b902 Mon Sep 17 00:00:00 2001 From: Bill Nagel Date: Tue, 2 Dec 2014 13:36:40 -0500 Subject: [PATCH] smb: Build with SSPI enabled Build SMB/CIFS protocol support when SSPI is enabled. --- configure.ac | 5 +++-- lib/smb.c | 5 ++--- lib/smb.h | 5 ++--- lib/url.c | 3 +-- lib/version.c | 3 +-- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index fb8dfd5b3..2cfef5ac2 100644 --- a/configure.ac +++ b/configure.ac @@ -3494,8 +3494,9 @@ if test "x$CURL_DISABLE_IMAP" != "x1"; then fi if test "x$CURL_DISABLE_SMB" != "x1" \ -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \ - -a \( "x$USE_SSLEAY" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \ - -o "x$NSS_ENABLED" = "x1" -o "x$DARWINSSL_ENABLED" = "x1" \); then + -a \( "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ + -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \ + -o "x$DARWINSSL_ENABLED" = "x1" \); then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB" if test "x$SSL_ENABLED" = "x1"; then SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS" diff --git a/lib/smb.c b/lib/smb.c index 1644471df..7627c8943 100644 --- a/lib/smb.c +++ b/lib/smb.c @@ -22,8 +22,7 @@ #include "curl_setup.h" -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - !defined(USE_WINDOWS_SSPI) +#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) #define BUILDING_CURL_SMB_C @@ -895,4 +894,4 @@ static CURLcode smb_parse_url_path(struct connectdata *conn) return CURLE_OK; } -#endif /* CURL_DISABLE_SMB && USE_NTLM && USE_WINDOWS_SSPI */ +#endif /* CURL_DISABLE_SMB && USE_NTLM */ diff --git a/lib/smb.h b/lib/smb.h index 7b601b889..ff1a812e3 100644 --- a/lib/smb.h +++ b/lib/smb.h @@ -256,12 +256,11 @@ struct smb_tree_disconnect { #endif /* BUILDING_CURL_SMB_C */ -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - !defined(USE_WINDOWS_SSPI) +#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) extern const struct Curl_handler Curl_handler_smb; extern const struct Curl_handler Curl_handler_smbs; -#endif /* CURL_DISABLE_SMB && USE_NTLM && USE_WINDOWS_SSPI */ +#endif /* CURL_DISABLE_SMB && USE_NTLM */ #endif /* HEADER_CURL_SMB_H */ diff --git a/lib/url.c b/lib/url.c index e6483ca88..8b4f3a95c 100644 --- a/lib/url.c +++ b/lib/url.c @@ -220,8 +220,7 @@ static const struct Curl_handler * const protocols[] = { #endif #endif -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - !defined(USE_WINDOWS_SSPI) +#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) &Curl_handler_smb, #ifdef USE_SSL &Curl_handler_smbs, diff --git a/lib/version.c b/lib/version.c index 511562fe1..4b583e8e5 100644 --- a/lib/version.c +++ b/lib/version.c @@ -216,8 +216,7 @@ static const char * const protocols[] = { #ifdef USE_LIBSSH2 "sftp", #endif -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - !defined(USE_WINDOWS_SSPI) +#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) "smb", # ifdef USE_SSL "smbs",