OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/http/http_auth_gssapi_posix.h" | 5 #include "net/http/http_auth_gssapi_posix.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 #if defined(DLOPEN_KERBEROS) | 412 #if defined(DLOPEN_KERBEROS) |
413 gssapi_library_ = LoadSharedLibrary(); | 413 gssapi_library_ = LoadSharedLibrary(); |
414 if (gssapi_library_ == NULL) | 414 if (gssapi_library_ == NULL) |
415 return false; | 415 return false; |
416 #endif // defined(DLOPEN_KERBEROS) | 416 #endif // defined(DLOPEN_KERBEROS) |
417 initialized_ = true; | 417 initialized_ = true; |
418 return true; | 418 return true; |
419 } | 419 } |
420 | 420 |
421 base::NativeLibrary GSSAPISharedLibrary::LoadSharedLibrary() { | 421 base::NativeLibrary GSSAPISharedLibrary::LoadSharedLibrary() { |
422 const char** library_names; | 422 const char* const* library_names; |
423 size_t num_lib_names; | 423 size_t num_lib_names; |
424 const char* user_specified_library[1]; | 424 const char* user_specified_library[1]; |
425 if (!gssapi_library_name_.empty()) { | 425 if (!gssapi_library_name_.empty()) { |
426 user_specified_library[0] = gssapi_library_name_.c_str(); | 426 user_specified_library[0] = gssapi_library_name_.c_str(); |
427 library_names = user_specified_library; | 427 library_names = user_specified_library; |
428 num_lib_names = 1; | 428 num_lib_names = 1; |
429 } else { | 429 } else { |
430 static const char* kDefaultLibraryNames[] = { | 430 static const char* const kDefaultLibraryNames[] = { |
431 #if defined(OS_MACOSX) | 431 #if defined(OS_MACOSX) |
432 "libgssapi_krb5.dylib" // MIT Kerberos | 432 "libgssapi_krb5.dylib" // MIT Kerberos |
433 #elif defined(OS_OPENBSD) | 433 #elif defined(OS_OPENBSD) |
434 "libgssapi.so" // Heimdal - OpenBSD | 434 "libgssapi.so" // Heimdal - OpenBSD |
435 #else | 435 #else |
436 "libgssapi_krb5.so.2", // MIT Kerberos - FC, Suse10, Debian | 436 "libgssapi_krb5.so.2", // MIT Kerberos - FC, Suse10, Debian |
437 "libgssapi.so.4", // Heimdal - Suse10, MDK | 437 "libgssapi.so.4", // Heimdal - Suse10, MDK |
438 "libgssapi.so.2", // Heimdal - Gentoo | 438 "libgssapi.so.2", // Heimdal - Gentoo |
439 "libgssapi.so.1" // Heimdal - Suse9, CITI - FC, MDK, Suse10 | 439 "libgssapi.so.1" // Heimdal - Suse9, CITI - FC, MDK, Suse10 |
440 #endif | 440 #endif |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 if (rv != OK) { | 884 if (rv != OK) { |
885 LOG(ERROR) << "Problem initializing context. \n" | 885 LOG(ERROR) << "Problem initializing context. \n" |
886 << DisplayExtendedStatus(library_, major_status, minor_status) | 886 << DisplayExtendedStatus(library_, major_status, minor_status) |
887 << '\n' | 887 << '\n' |
888 << DescribeContext(library_, scoped_sec_context_.get()); | 888 << DescribeContext(library_, scoped_sec_context_.get()); |
889 } | 889 } |
890 return rv; | 890 return rv; |
891 } | 891 } |
892 | 892 |
893 } // namespace net | 893 } // namespace net |
OLD | NEW |