summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* common: Improved the certificate information extračtionDavid Sommerseth2013-06-072-2/+88
| | | | | | | | | Added a function to extract the needed information from an OpenSSL X509 object. Also extended parse_tlsid() to include a pointer to the certificate digest, to have a common behaviour between parse_tlsid() and parse_x509_cert(). Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* common: Prepare for OpenVPN 2.3's new logging feature in plug-in API v3David Sommerseth2013-06-053-7/+42
| | | | | | | In OpenVPN v2.3 there's a new plug-in API with a more integrated log features. This patch prepares the logging infrastructure for this API. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* New feature: Added config option auth_disable_internalDavid Sommerseth2013-03-031-0/+1
| | | | | | | | | | | | By setting this config option in the eurephia database, eurephia will expect all user account/certificate links to be set up with an external plug-in for username/password authentications. Further, it is now ensured that system configuration issues or general failures not related to the user authentication itself, is not counted as a login attempt. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Added the first stab of an authentication plug-in frameworkDavid Sommerseth2013-03-032-2/+6
| | | | | | | | | 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>
* common: Added possibility to do dlsym() lookups as optional via ↵David Sommerseth2013-03-032-5/+22
| | | | | | | | eGetSym_optional() Will be used by the authentication plug-in framework. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Updated copyright datesDavid Sommerseth2012-10-0827-27/+27
| | | | Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* common: Fixed an error in the veurephia_log() macroDavid Sommerseth2011-07-261-1/+1
| | | | | | | The argument list didn't match what the internal _veurephia_log_func() function expected. This error was introduced in commit ebf4e80250b525e17 Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Moved generic parts of the config file parser to the common libraryDavid Sommerseth2011-07-253-0/+191
| | | | | | | Modified the eurephiadm client_config section to make use of the common version as well. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* common: Rework eurephia_log() to include also veurephia_log()David Sommerseth2011-07-252-11/+53
| | | | | | | veurephia_log() is to eurephia_log() what vprintf() is to printf(), taking va_list and const char *fmt arguments directly. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Look for endian.h in include/sys as well.David Sommerseth2010-12-311-1/+5
| | | | | | On FreeBSD the endian.h file is located in sys/endian.h. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Make use of more cross-platform friendly libc functionsDavid Sommerseth2010-12-311-3/+5
| | | | | | | | The initial implementation of the SHA512 hashing functions was tightly connected to glibc. This patch changes those few functions which is glibc to more portable functions. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Implemented proper TUN support in eurephiaDavid Sommerseth2010-12-141-0/+1
| | | | | | | | | | Now eurephia will support both TUN and TAP configurations in OpenVPN. Thanks to Tavis Paquette and Matthew Gyurgyik for their willingness to test out this patch. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Added a new eurephiaVALUES function: eClear_key_value()David Sommerseth2010-12-132-2/+16
| | | | | | | | This function clears the contents of a eurephiaVALUES key/value record. It will not remove the record from the stack, but only free the key and value pointers and sets them to NULL. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Implemented detection of OpenVPN tunnel device typeDavid Sommerseth2010-11-301-0/+9
| | | | | | | | | | | | This will later be used to be able to support OpenVPN in tun mode as well as the now only supported tap mode. It will first try to detect the tunnel type based on the 'dev_type' environment variable if available. If not, it will try to figure it out based on the device name. If this fails, it is possible to force the eurephia to a specific device type by setting the openvpn_devtype config variable. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Discovered a failing loop checkDavid Sommerseth2010-09-271-1/+1
| | | | | | This could cause eurephia to use a faulty hashing rounds value. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Harden memory management in passwd.cDavid Sommerseth2010-09-271-0/+18
| | | | | | | Do a mlock() call on all buffers used by the password hashing algorithms, to make sure these data segments never will be written to swap. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Updated wrong log entriesDavid Sommerseth2010-08-291-1/+1
| | | | | | Removed old and obsolete expressions used to reference the eurephia database driver. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Fixed a SEGV issue when adding values to a value chainDavid Sommerseth2010-08-241-2/+2
| | | | | | eAdd_valuestruct() did not use a nullsafe strdup(). Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Fixed a few doxygen complaints - missing documentationDavid Sommerseth2010-07-301-0/+7
| | | | Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Updated Copyright dates to include 2010David Sommerseth2010-07-3024-24/+24
|
* Cosmetic debug logging fixDavid Sommerseth2009-12-141-1/+1
|
* More driver API clean upDavid Sommerseth2009-11-041-11/+1
|
* Cleaned up the driver/interface API for database and firewallDavid Sommerseth2009-11-041-0/+43
|
* Don't log source filename and line number if DEBUG is not enabledDavid Sommerseth2009-10-061-7/+11
|
* Fixed compile warnings 32bit platformsDavid Sommerseth2009-10-051-1/+1
|
* Removed not needed memset()'sDavid Sommerseth2009-10-021-2/+0
|
* Fixed some memory issues and a memory leak in passwd.cDavid Sommerseth2009-10-021-2/+5
|
* Fixed wrong define string for include filenameDavid Sommerseth2009-09-301-2/+2
|
* Merge branch 'syslog'David Sommerseth2009-09-285-54/+391
|\
| * Added extra parameter to eurephia_log_init() to set log ident for syslogDavid Sommerseth2009-09-242-3/+4
| |
| * Added missing doxygen comments after the last eurephia_log() improvementsDavid Sommerseth2009-09-242-1/+14
| | | | | | | | Ref. commit: f2a4f0412bc1f7b9069ecbcce8f5599f46f757e0
| * Improved file logging, providing source file and line number infoDavid Sommerseth2009-09-243-10/+24
| | | | | | | | | | Also changed malloc_nullsafe() and free_nullsafe() to report directly which file:line which called the malloc/free function.
| * Added missing header file and corrected doxygen errorsDavid Sommerseth2009-09-242-1/+96
| |
| * Rewritten the eurephia_log() to support syslog logging as wellDavid Sommerseth2009-09-243-46/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also simplified the initialisation of the logging module. By calling the eurephia_log_init(eurephiaCTX *, char *dest, int loglevel) function, a log context will be setup inside the eurephiaCTX. To close the log file, eurephia_log_close(eurephiaCTX *) must be called. The destination string to eurephia_log_init() can be: - stdout: Log everything to stdout - stderr: Log everything to stderr - none: Do no logging at all - syslog:<facility> Log via syslog. <facility> can be: user, local[0-7], daemon or authpriv. - Filename All logging goes to the given filename. If the filename string is not recognised by any of the reserved words above, it will be handled as a filename.
* | Code clean up. Moved xmlReplaceChars() to eurephia_xml.cDavid Sommerseth2009-09-272-0/+23
| |
* | Make eurephiaXML_ParserResultMsg() return NULL if input XML document pointer ↵David Sommerseth2009-09-271-1/+4
| | | | | | | | is NULL
* | Added misc. compiler optimisationsDavid Sommerseth2009-09-262-8/+14
| |
* | Moved from bzero() to memset()David Sommerseth2009-09-261-1/+1
| |
* | Don't assert() if the input XML doc to eurephiaXML_IsResult() is NULL.David Sommerseth2009-09-261-1/+4
| |
* | Added extra check on node pointer, to avoid possible SEGVDavid Sommerseth2009-09-261-1/+1
| |
* | Added eurephiaXML_IsResultMsg() to check if an XML doc is a ResultMsg documentDavid Sommerseth2009-09-252-0/+17
| |
* | Moved the useful append_str() macro from sqlite.c to eurephia_nullsafe.hDavid Sommerseth2009-09-251-0/+11
|/
* Fixed and cleaned up Doxygen commentsDavid Sommerseth2009-09-221-2/+14
|
* Rewrote eurephiaXML_ResultMsg() to also support adding an xmlNode* with more ↵David Sommerseth2009-09-212-10/+75
| | | | | | | | info The eurephia result XML document is also changed, and all parsing of the result must be rewritten. To simplify this parsing, a new function is introduced, eurephiaXML_ParseResultMsg().
* BUGFIX: saltlen was set to 0 when a buffer for a new salt was generatedDavid Sommerseth2009-09-151-12/+12
| | | | | | This error caused eurephia_pwd_crypt() to fail, especially when salt length was requested to be longer. The solution was to retrieve the salt length before allocating memory for it.
* Fixed some new Doxygen warnings which came after enabling static functions ↵David Sommerseth2009-09-142-6/+3
| | | | and vars
* Added eRemove_value() function, to remove a key/value pair from an ↵David Sommerseth2009-09-142-3/+48
| | | | eurephiaVALUES chain
* Added a simple xmlNode iterator for future usageDavid Sommerseth2009-09-141-0/+8
|
* Corrected some doxygen issues after rearranging the sqlite3 db driver codeDavid Sommerseth2009-09-131-1/+1
|
* Some simple comments to the SHA512 implementationDavid Sommerseth2009-09-112-8/+50
|