summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2013-03-03 00:46:23 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2013-03-03 00:58:09 +0100
commit25e5147c7d3e16ec96713c214dc28e398b3be10c (patch)
treeb43c9612580f7070608a8848727cc5a358f0a5a8 /common
parent262442599d5352f8c48018d975b7f50a53dab33c (diff)
downloadeurephia-25e5147c7d3e16ec96713c214dc28e398b3be10c.tar.gz
eurephia-25e5147c7d3e16ec96713c214dc28e398b3be10c.tar.xz
eurephia-25e5147c7d3e16ec96713c214dc28e398b3be10c.zip
Added the first stab of an authentication plug-in framework
This enables a run-time loadable support for other authentication modules. This can be used to make eurephia authenticate user's passwords against other sources than the local eurephia database itself. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'common')
-rw-r--r--common/CMakeLists.txt4
-rw-r--r--common/eurephia_context.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index 3a9ff45..ad4c3c7 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -1,6 +1,6 @@
# cmake rules for eurephia - common static library
#
-# GPLv2 only - Copyright (C) 2008 - 2012
+# GPLv2 only - Copyright (C) 2008 - 2013
# David Sommerseth <dazo@users.sourceforge.net>
#
# This program is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ PROJECT(eurephiaCOMMON C)
cmake_minimum_required(VERSION 2.6)
# Compiler settigns
-INCLUDE_DIRECTORIES(. ../database)
+INCLUDE_DIRECTORIES(. ../database ../auth)
# Only compile these files if we have libxml2
SET(add_xml_code "")
diff --git a/common/eurephia_context.h b/common/eurephia_context.h
index 845850b..f8cf4ba 100644
--- a/common/eurephia_context.h
+++ b/common/eurephia_context.h
@@ -34,6 +34,8 @@
#include <stdio.h>
#include <eurephiadb_struct.h>
#include <eurephia_log_struct.h>
+#include <eurephia_authplugin_context.h>
+
/**
* eurephia context types
*/
@@ -52,6 +54,7 @@ typedef enum OVPN_tunnelType_e { tuntype_UNKN, /**< Unknwown */
tuntype_TUN /**< OpenVPN is used with --dev tun */
} OVPN_tunnelType;
+
/**
* main structure for the eurephia module context
* - the same context structure is used for all OpenVPN sessions
@@ -66,6 +69,7 @@ typedef struct {
#else
void *fwcfg; /**< Dummy pointer, if the firewall API is not enabled */
#endif
+ eAuthPluginCTX *authplugs; /**< Authentication plug-in contexts. May be NULL */
char *server_salt; /**< The in-memory password salt, used for the password cache */
eurephiaLOG *log; /**< Log context, used by eurephia_log() */
int fatal_error; /**< If this flag is set, the execution should stop immediately */