summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-02-17 03:27:39 +0100
committerMatthias Schiffer <matthias@gamezock.de>2010-02-17 03:27:39 +0100
commit9197a1e626345437f00fbf401325146259980634 (patch)
tree140550b8a716757c3be1ffa798699ca2c8e0f0a5 /src
parent3e17bfe4f2e5e64f9528c26b38d4241ca46f1082 (diff)
downloadmad-9197a1e626345437f00fbf401325146259980634.tar
mad-9197a1e626345437f00fbf401325146259980634.zip
Updated for new boost release & new kadm5 API
Included boost patch (needed for boost < 1.42)
Diffstat (limited to 'src')
-rw-r--r--src/Common/AuthManager.h1
-rw-r--r--src/Core/ThreadManager.h1
-rw-r--r--src/mad-server.conf1
-rw-r--r--src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp8
-rw-r--r--src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h2
5 files changed, 7 insertions, 6 deletions
diff --git a/src/Common/AuthManager.h b/src/Common/AuthManager.h
index 0c249ad..1595495 100644
--- a/src/Common/AuthManager.h
+++ b/src/Common/AuthManager.h
@@ -28,6 +28,7 @@
#include <map>
#include <set>
+#include <vector>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
diff --git a/src/Core/ThreadManager.h b/src/Core/ThreadManager.h
index 9cae13c..d03dc5d 100644
--- a/src/Core/ThreadManager.h
+++ b/src/Core/ThreadManager.h
@@ -27,6 +27,7 @@
#include <boost/asio.hpp>
+#include <boost/function.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/locks.hpp>
diff --git a/src/mad-server.conf b/src/mad-server.conf
index ad2a955..02ca76c 100644
--- a/src/mad-server.conf
+++ b/src/mad-server.conf
@@ -79,6 +79,7 @@ UserManager {
}
Krb5 {
+ Realm "EXAMPLE.COM"
Principal "root/admin"
Password "test"
}
diff --git a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp
index 72c8160..5f4e3cf 100644
--- a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp
+++ b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp
@@ -64,8 +64,8 @@ void UserConfigBackendKrb5::_connect() {
princ += "@" + realm;
if(!password.isEmpty() && keytab.isEmpty()) {
- krb5_error_code err = kadm5_init_with_password(const_cast<char*>(princ.toLocale().c_str()), const_cast<char*>(password.toLocale().c_str()),
- const_cast<char*>(KADM5_ADMIN_SERVICE), &params, KADM5_STRUCT_VERSION, KADM5_API_VERSION_2, 0, &handle);
+ krb5_error_code err = kadm5_init_with_password(context, const_cast<char*>(princ.toLocale().c_str()), const_cast<char*>(password.toLocale().c_str()),
+ const_cast<char*>(KADM5_ADMIN_SERVICE), &params, KADM5_STRUCT_VERSION, KADM5_API_VERSION_3, 0, &handle);
if(err) {
application->log(Core::Logger::LOG_USER, Core::Logger::LOG_ERROR, Core::Format("kadm5_init_with_password: %1%") % krb5_get_error_message(context, err));
@@ -80,8 +80,8 @@ void UserConfigBackendKrb5::_connect() {
keytabName = const_cast<char*>(keytabStr.c_str());
}
- krb5_error_code err = kadm5_init_with_skey(const_cast<char*>(princ.toLocale().c_str()), keytabName,
- const_cast<char*>(KADM5_ADMIN_SERVICE), &params, KADM5_STRUCT_VERSION, KADM5_API_VERSION_2, 0, &handle);
+ krb5_error_code err = kadm5_init_with_skey(context, const_cast<char*>(princ.toLocale().c_str()), keytabName,
+ const_cast<char*>(KADM5_ADMIN_SERVICE), &params, KADM5_STRUCT_VERSION, KADM5_API_VERSION_3, 0, &handle);
if(err) {
application->log(Core::Logger::LOG_USER, Core::Logger::LOG_ERROR, Core::Format("kadm5_init_with_skey: %1%") % krb5_get_error_message(context, err));
diff --git a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h
index c02f868..34ab14c 100644
--- a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h
+++ b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h
@@ -27,8 +27,6 @@
#include <Core/ConfigManager.h>
#include <boost/thread/mutex.hpp>
-
-#define USE_KADM5_API_VERSION 2
#include <kadm5/admin.h>
namespace Mad {