#include "../Mandshurica/mandshurica.h"
#include "../Mandshurica/ms_log.h"
+#include "../Mandshurica/ms_util.h"
+#include <stdlib.h>
#include <string.h>
-#include <syslog.h>
const char mod_type[] = MS_MOD_AUTH;
int mod_init(struct mandshurica_config* _config) {
config = _config;
config->mandshurica_log(MS_INFO, "Basic authentication Module init");
+
+ char* db = config->mandshurica_get_param("BasicDB");
+
+ if(db == NULL) {
+ config->mandshurica_log(MS_ERROR, "Basic authentication Database path is not set!");
+ return 1;
+ }
+
+ char* log = mandshurica_strcat("Basic authentication Database is ", db);
+ config->mandshurica_log(MS_INFO, log);
+ free(log);
+
return 0;
}