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

Unified Diff: net/http/http_auth_gssapi_posix.cc

Issue 2826273004: Enable loading gssapi library for Chromad. (Closed)
Patch Set: Enable loading gssapi library for Chromad. Created 3 years, 8 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
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 c8302353b7fc1ac263a820d7251f1a05c36b5ae3..0748f6bc3734392d9b7ddd75b1660fe6073fcb23 100644
--- a/net/http/http_auth_gssapi_posix.cc
+++ b/net/http/http_auth_gssapi_posix.cc
@@ -380,9 +380,11 @@ std::string DescribeContext(GSSAPILibrary* gssapi_lib,
} // namespace
-GSSAPISharedLibrary::GSSAPISharedLibrary(const std::string& gssapi_library_name)
+GSSAPISharedLibrary::GSSAPISharedLibrary(const std::string& gssapi_library_name,
+ bool allow_gssapi_library_load)
: initialized_(false),
gssapi_library_name_(gssapi_library_name),
+ allow_gssapi_library_load_(allow_gssapi_library_load),
gssapi_library_(NULL),
import_name_(NULL),
release_name_(NULL),
@@ -392,8 +394,7 @@ GSSAPISharedLibrary::GSSAPISharedLibrary(const std::string& gssapi_library_name)
init_sec_context_(NULL),
wrap_size_limit_(NULL),
delete_sec_context_(NULL),
- inquire_context_(NULL) {
-}
+ inquire_context_(NULL) {}
GSSAPISharedLibrary::~GSSAPISharedLibrary() {
if (gssapi_library_) {
@@ -411,6 +412,11 @@ bool GSSAPISharedLibrary::Init() {
bool GSSAPISharedLibrary::InitImpl() {
DCHECK(!initialized_);
#if defined(DLOPEN_KERBEROS)
+ // On Chrome OS only Active Directory managed devices are configured
+ // to use Kerberos.
+ if (!allow_gssapi_library_load_)
+ return false;
+
gssapi_library_ = LoadSharedLibrary();
if (gssapi_library_ == NULL)
return false;

Powered by Google App Engine
This is Rietveld 408576698