summaryrefslogtreecommitdiffstats
path: root/src/modules/UserConfigBackendKrb5
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-08-18 15:58:17 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-08-18 15:58:17 +0200
commitdb5ad2e09a6b38e841463dbe7eb076492b62c948 (patch)
tree5907f6416e35cbd25432a5f1f6dc9664d36aa73c /src/modules/UserConfigBackendKrb5
parent5da7b0847bac2a5abec95b9ac1701b74baae8964 (diff)
downloadmad-db5ad2e09a6b38e841463dbe7eb076492b62c948.tar
mad-db5ad2e09a6b38e841463dbe7eb076492b62c948.zip
Mad funktioniert jetzt unter Windows
Diffstat (limited to 'src/modules/UserConfigBackendKrb5')
-rw-r--r--src/modules/UserConfigBackendKrb5/Module.cpp4
-rw-r--r--src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp22
2 files changed, 14 insertions, 12 deletions
diff --git a/src/modules/UserConfigBackendKrb5/Module.cpp b/src/modules/UserConfigBackendKrb5/Module.cpp
index ecfec56..3ef9b88 100644
--- a/src/modules/UserConfigBackendKrb5/Module.cpp
+++ b/src/modules/UserConfigBackendKrb5/Module.cpp
@@ -17,11 +17,13 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "../export.h"
+
#include "Module.h"
extern "C" {
-Mad::Common::Module* UserConfigBackendKrb5_create(Mad::Common::Application *application) {
+MAD_MODULE_EXPORT Mad::Common::Module* UserConfigBackendKrb5_create(Mad::Common::Application *application) {
return new Mad::Modules::UserConfigBackendKrb5::Module(application);
}
diff --git a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp
index beedbae..35d65ae 100644
--- a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp
+++ b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp
@@ -29,12 +29,12 @@ namespace UserConfigBackendKrb5 {
void UserConfigBackendKrb5::connect() {
if(principal.empty()) {
- application->log(Core::LoggerBase::USER, Core::LoggerBase::ERROR, "UserConfigBackendKrb5: no principal given");
+ application->log(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_ERROR, "UserConfigBackendKrb5: no principal given");
return;
}
if(realm.empty()) {
- application->log(Core::LoggerBase::USER, Core::LoggerBase::ERROR, "UserConfigBackendKrb5: no realm given and no default realm available");
+ application->log(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_ERROR, "UserConfigBackendKrb5: no realm given and no default realm available");
return;
}
@@ -64,7 +64,7 @@ void UserConfigBackendKrb5::connect() {
const_cast<char*>(KADM5_ADMIN_SERVICE), &params, KADM5_STRUCT_VERSION, KADM5_API_VERSION_2, 0, &handle);
if(err) {
- application->logf(Core::LoggerBase::USER, Core::LoggerBase::ERROR, "kadm5_init_with_password: %s", krb5_get_error_message(context, err));
+ application->logf(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_ERROR, "kadm5_init_with_password: %s", krb5_get_error_message(context, err));
return;
}
}
@@ -77,12 +77,12 @@ void UserConfigBackendKrb5::connect() {
const_cast<char*>(KADM5_ADMIN_SERVICE), &params, KADM5_STRUCT_VERSION, KADM5_API_VERSION_2, 0, &handle);
if(err) {
- application->logf(Core::LoggerBase::USER, Core::LoggerBase::ERROR, "kadm5_init_with_skey: %s", krb5_get_error_message(context, err));
+ application->logf(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_ERROR, "kadm5_init_with_skey: %s", krb5_get_error_message(context, err));
return;
}
}
- application->log(Core::LoggerBase::USER, Core::LoggerBase::VERBOSE, "Connected to kerberos admin server.");
+ application->log(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_VERBOSE, "Connected to kerberos admin server.");
return;
}
@@ -153,7 +153,7 @@ void UserConfigBackendKrb5::addUser(const Common::UserInfo &userInfo) throw(Core
do {
err = kadm5_create_principal(handle, &princ, KADM5_PRINCIPAL|KADM5_ATTRIBUTES, dummybuf);
if(err == KADM5_RPC_ERROR && retryCount > 0) {
- application->log(Core::LoggerBase::USER, Core::LoggerBase::VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
+ application->log(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
connect();
--retryCount;
}
@@ -166,7 +166,7 @@ void UserConfigBackendKrb5::addUser(const Common::UserInfo &userInfo) throw(Core
do {
err = kadm5_randkey_principal(handle, princ.principal, 0, 0);
if(err == KADM5_RPC_ERROR && retryCount > 0) {
- application->log(Core::LoggerBase::USER, Core::LoggerBase::VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
+ application->log(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
connect();
--retryCount;
}
@@ -180,7 +180,7 @@ void UserConfigBackendKrb5::addUser(const Common::UserInfo &userInfo) throw(Core
do {
err = kadm5_modify_principal(handle, &princ, KADM5_ATTRIBUTES);
if(err == KADM5_RPC_ERROR && retryCount > 0) {
- application->log(Core::LoggerBase::USER, Core::LoggerBase::VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
+ application->log(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
connect();
--retryCount;
}
@@ -222,7 +222,7 @@ void UserConfigBackendKrb5::deleteUser(const Common::UserInfo &userInfo) throw(C
do {
err = kadm5_delete_principal(handle, princ);
if(err == KADM5_RPC_ERROR && retryCount > 0) {
- application->log(Core::LoggerBase::USER, Core::LoggerBase::VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
+ application->log(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
connect();
--retryCount;
}
@@ -231,7 +231,7 @@ void UserConfigBackendKrb5::deleteUser(const Common::UserInfo &userInfo) throw(C
krb5_free_principal(context, princ);
if(err)
- application->logf(Core::LoggerBase::USER, Core::LoggerBase::WARNING, "kadm5_delete_principal: %s", krb5_get_error_message(context, err));
+ application->logf(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_WARNING, "kadm5_delete_principal: %s", krb5_get_error_message(context, err));
}
void UserConfigBackendKrb5::setPassword(const Common::UserInfo &userInfo, const std::string &password) throw(Core::Exception) {
@@ -252,7 +252,7 @@ void UserConfigBackendKrb5::setPassword(const Common::UserInfo &userInfo, const
do {
err = kadm5_chpass_principal(handle, princ, const_cast<char*>(password.c_str()));
if(err == KADM5_RPC_ERROR && retryCount > 0) {
- application->log(Core::LoggerBase::USER, Core::LoggerBase::VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
+ application->log(Core::LoggerBase::LOG_USER, Core::LoggerBase::LOG_VERBOSE, "Connection to kerberos admin server lost. Reconnecting...");
connect();
--retryCount;
}