From 25e5147c7d3e16ec96713c214dc28e398b3be10c Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Sun, 3 Mar 2013 00:46:23 +0100 Subject: 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 --- common/CMakeLists.txt | 4 ++-- common/eurephia_context.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'common') 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 # # 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 #include #include +#include + /** * 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 */ -- cgit