summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-05-06 15:58:33 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-06 22:59:12 +0000
commit51bf98859f09d62152a3662839f93b9efad826c5 (patch)
tree76204c0e16602ccb0fe24453de44bba0b93d812b
parentaf0395e4050f80e08472c025ac42948b55de2eaa (diff)
downloadchromium_src-51bf98859f09d62152a3662839f93b9efad826c5.zip
chromium_src-51bf98859f09d62152a3662839f93b9efad826c5.tar.gz
chromium_src-51bf98859f09d62152a3662839f93b9efad826c5.tar.bz2
mac: Build http_auth_gssapi_posix.h against Kerberos.framework.
The previous code built http_auth_gssapi_posix against GSS.framework when using an OSX 10.9+ SDK. This is incorrect, since at run time, http_auth_gssapi_posix always dlopens libgssapi_krb5.dylib, which is provided by Kerberos.framework. Change the header to always build against Kerberos.framework. BUG=471823 Review URL: https://codereview.chromium.org/1108913005 Cr-Commit-Position: refs/heads/master@{#328645}
-rw-r--r--net/http/http_auth_gssapi_posix.cc3
-rw-r--r--net/http/http_auth_gssapi_posix.h15
2 files changed, 14 insertions, 4 deletions
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc
index d294a5e..0e8af79 100644
--- a/net/http/http_auth_gssapi_posix.cc
+++ b/net/http/http_auth_gssapi_posix.cc
@@ -430,7 +430,8 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLibrary() {
} else {
static const char* const kDefaultLibraryNames[] = {
#if defined(OS_MACOSX)
- "libgssapi_krb5.dylib" // MIT Kerberos
+ // This library is provided by Kerberos.framework.
+ "libgssapi_krb5.dylib"
#elif defined(OS_OPENBSD)
"libgssapi.so" // Heimdal - OpenBSD
#else
diff --git a/net/http/http_auth_gssapi_posix.h b/net/http/http_auth_gssapi_posix.h
index 58f17a6..ab967c96 100644
--- a/net/http/http_auth_gssapi_posix.h
+++ b/net/http/http_auth_gssapi_posix.h
@@ -12,10 +12,19 @@
#include "net/base/net_export.h"
#include "net/http/http_auth.h"
-#if defined(OS_MACOSX) && defined(MAC_OS_X_VERSION_10_9) && \
+#if defined(OS_MACOSX)
+// The OSX 10.9+ SDKs mark the functions in Kereberos.framework as deprecated,
+// so the warnings must be manually suppressed.
+#if defined(MAC_OS_X_VERSION_10_9) && \
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
-// Including gssapi.h directly is deprecated in the 10.9 SDK.
-#include <GSS/gssapi.h>
+#define GSSKRB_APPLE_DEPRECATED(x)
+#endif
+
+// Chrome supports OSX 10.6, which doesn't have access to GSS.framework. Chrome
+// always dlopens libgssapi_krb5.dylib, which is provided by
+// Kerberos.framework. On OSX 10.7+ this is an ABI comptabile shim that loads
+// GSS.framework.
+#include <Kerberos/gssapi.h>
#elif defined(OS_FREEBSD)
#include <gssapi/gssapi.h>
#else