summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp8
-rw-r--r--src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h2
2 files changed, 4 insertions, 6 deletions
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 {