Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: net/http/http_auth_gssapi_posix.cc

Issue 7655046: Linux: allow linking directly with Kerberos instead of using dlopen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hopefully fix ChromeOS Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth_gssapi_posix.h ('k') | net/http/http_auth_gssapi_posix_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_gssapi_posix.cc
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc
index 25ee910dc001946638f293ddcda3d2bfec8ac353..cc27e70b18af1375bdb7fcd28d83fb3339a122cf 100644
--- a/net/http/http_auth_gssapi_posix.cc
+++ b/net/http/http_auth_gssapi_posix.cc
@@ -17,6 +17,7 @@
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
+#if defined(DLOPEN_KERBEROS)
// These are defined for the GSSAPI library:
// Paraphrasing the comments from gssapi.h:
// "The implementation must reserve static storage for a
@@ -62,6 +63,7 @@ gss_OID GSS_C_NT_HOSTBASED_SERVICE_X = &GSS_C_NT_HOSTBASED_SERVICE_X_VAL;
gss_OID GSS_C_NT_HOSTBASED_SERVICE = &GSS_C_NT_HOSTBASED_SERVICE_VAL;
gss_OID GSS_C_NT_ANONYMOUS = &GSS_C_NT_ANONYMOUS_VAL;
gss_OID GSS_C_NT_EXPORT_NAME = &GSS_C_NT_EXPORT_NAME_VAL;
+#endif // defined(DLOPEN_KERBEROS)
namespace net {
@@ -410,9 +412,11 @@ bool GSSAPISharedLibrary::Init() {
bool GSSAPISharedLibrary::InitImpl() {
DCHECK(!initialized_);
+#if defined(DLOPEN_KERBEROS)
gssapi_library_ = LoadSharedLibrary();
if (gssapi_library_ == NULL)
return false;
+#endif // defined(DLOPEN_KERBEROS)
initialized_ = true;
return true;
}
@@ -459,17 +463,20 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLibrary() {
return NULL;
}
+#if defined(DLOPEN_KERBEROS)
#define BIND(lib, x) \
+ DCHECK(lib); \
gss_##x##_type x = reinterpret_cast<gss_##x##_type>( \
base::GetFunctionPointerFromNativeLibrary(lib, "gss_" #x)); \
if (x == NULL) { \
LOG(WARNING) << "Unable to bind function \"" << "gss_" #x << "\""; \
return false; \
}
+#else
+#define BIND(lib, x) gss_##x##_type x = gss_##x
+#endif
bool GSSAPISharedLibrary::BindMethods(base::NativeLibrary lib) {
- DCHECK(lib != NULL);
-
BIND(lib, import_name);
BIND(lib, release_name);
BIND(lib, release_buffer);
« no previous file with comments | « net/http/http_auth_gssapi_posix.h ('k') | net/http/http_auth_gssapi_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698