summaryrefslogtreecommitdiffstats
path: root/database
Commit message (Collapse)AuthorAgeFilesLines
...
* eurephiadm can now use eDBadminValidateSession(...) to use open session. ↵David Sommerseth2008-11-301-1/+44
| | | | Auto-logout implemented as well
* Unified define flagsDavid Sommerseth2008-11-303-5/+5
|
* Completed the change of authentication model in database driverDavid Sommerseth2008-11-302-85/+49
| | | | | | Follow up of commit 103acd7c2e1467401f0795930be9140dc5ed47ff. Seems to work fine via both plugin mode and eurephiadm, regarding core dumping too.
* Fixed core dump issue with eDBstore_session_value(...) / ↵David Sommerseth2008-11-301-0/+1
| | | | (*eDBstore_session_value)(...)
* Improved admin authentication modelDavid Sommerseth2008-11-302-1/+5
| | | | | | Remove the session creation logic from the database layer, as that should be located in the application instead. Database layer should do as strictly as possible database things.
* Merge branch 'master' into eurephiadmDavid Sommerseth2008-11-291-5/+8
|\
| * BUGFIX: Use hard coded default values when checking against openvpn_attempts ↵David Sommerseth2008-11-291-5/+8
| | | | | | | | if config parameters is not set
* | Login seems to work from database driver sideDavid Sommerseth2008-11-293-7/+256
| |
* | Corrected silly typoDavid Sommerseth2008-11-291-1/+1
| |
* | Added context_type into eurephiaCTX struct. Database queries limited due to ↵David Sommerseth2008-11-291-0/+4
| | | | | | | | context type.
* | Splitted plugin/eurephiadb_session.[ch] into two partsDavid Sommerseth2008-11-282-2/+2
| | | | | | | | | | | | | | | | | | One part is a generic session handling part (common/eurephiadb_session_common.[ch]) and the other part is left in the old plugin/eurephiadb_session.[ch]. This splitting should make it easiser to reuse some of the session handling functions for the admin utils.
* | Rough preparation of the db drivers for API ver 2David Sommerseth2008-11-282-3/+29
| |
* | Added some needed admin functionsDavid Sommerseth2008-11-282-1/+34
|/
* Added minimum API version check when loading database driver.David Sommerseth2008-11-282-2/+11
|
* BUGFIX: Added missing linking against cryptoDavid Sommerseth2008-11-281-1/+1
|
* Cleaned up eurephiadb_session dependenciesDavid Sommerseth2008-11-282-2/+0
| | | | | Moved eurephiadb_session_struct.h to the common directory and made sure that eurephiadb_session.h is only included where needed
* Renamed eurephia_struct.h to eurephia_context.hDavid Sommerseth2008-11-272-2/+2
| | | | | | | | | | | | | Since this include file now only consists of eurephiaCTX definition, it was moved to the common/ directory and renamed. Moved the SESSION_* definitions out of this file and into plugin/eurephiadb_session.h where they belong. Moved the Posix MQ definitions into plugin/firewall/eurephiafw_struct.h where they belong. eurephia_context.h is now containing only context related things.
* Code cleanup: Splitted all structures defined in eurephia_struct.h into ↵David Sommerseth2008-11-053-1/+38
| | | | separate include files
* Renamed eurephiadb-sqlite to edb-sqliteDavid Sommerseth2008-11-052-7/+7
|
* Code improvement - using already assigned (char *) pointer instead of ↵David Sommerseth2008-11-031-1/+1
| | | | calling sqlite_get_value(...) once again
* Added double check if ip address is NULL or notDavid Sommerseth2008-11-011-1/+4
|
* Fixed missing WHERE clause in SQL for extracting blacklisted IP addressesDavid Sommerseth2008-11-012-2/+2
|
* Fixed wrong registration of IP addresses in eDBget_blacklisted_ip(...)David Sommerseth2008-11-012-2/+2
|
* Added eDBget_blacklisted_ip(ctx) functions into db driversDavid Sommerseth2008-11-012-0/+44
|
* Code cleanup in eurephiadb.cDavid Sommerseth2008-11-011-18/+18
|
* Updated eurephiadb driver to implement eDBget_blacklisted_ip() functionDavid Sommerseth2008-11-012-1/+2
|
* Created install rules via cmakeDavid Sommerseth2008-10-211-1/+6
|
* Reorganised the source codeDavid Sommerseth2008-10-154-6/+252
| | | | | | | | Moved all OpenVPN plug-in related things into ./plugins, including firewall Moved all shared code into ./common and moved the generic part of the database files into ./database Updated all CMakeLists.txt files and created a new one for the root directory
* Merge branch 'master' into cmakev0.9_betaDavid Sommerseth2008-10-082-27/+5
|\
| * Moved TLS authentication logging from database module to eurephia.cDavid Sommerseth2008-10-082-27/+5
| | | | | | | | Also differentiated log level from user certs (depth == 0) and other depths.
* | Merge branch 'master' into cmakeDavid Sommerseth2008-10-043-161/+171
|\|
| * Log review - last round for now. Recategorised a few errors and warnings.David Sommerseth2008-10-042-5/+5
| |
| * Log review - changed log levels for all DEBUG(...) callsDavid Sommerseth2008-10-043-45/+45
| |
| * Log review (part 1) - log categoriesDavid Sommerseth2008-10-032-113/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Went through all parts of the code, and reorganised log categories. The following "rules" where used for categorisation: LOG_INFO - General info, should avoid log level higher than 5 LOG_DEBUG - Using DEBUG function only log level always > 10 LOG_WARNING - When something action fails, but not as severe that the process cannot continue. Log level never > 2 LOG_ERROR - API errors, but not severe, can continue LOG_FATAL - Action failed and we cannot continue in this function. Log level always < 2 LOG_PANIC - Action failed and eurephia-auth cannot continue to work any more (program restart needed). Log level always 0
* | Made cmake also create template databaseDavid Sommerseth2008-10-031-0/+10
| |
* | Improved cmake rulesDavid Sommerseth2008-10-031-6/+21
| | | | | | | | | | | | - Added checks for external libraries that we use - Linking now links in needed shared libraries - Added better check if OPENVPN_SRC_DIR is set
* | Adjusted to match new cmake regimeDavid Sommerseth2008-10-021-0/+3
| |
* | Added support for cmakeDavid Sommerseth2008-10-022-43/+14
|/
* Improved description in database driver template regarding argument parsingDavid Sommerseth2008-09-261-7/+20
|
* BUGFIX: Changed SQLite database schema to allow mulitple identical sessionseedsDavid Sommerseth2008-09-261-1/+2
| | | | | | | | | This is to comply to the new behaviour after commit fc8a177bc86fc7e68b15045ba7a791e2504f4b5c. Now we might get several identical session seeds, but some of them might be connected to sessions getting destroyed, while one of them would be connected to an already active session. sessionkey is now the primary key.
* BUGFIX: Follow up on the commit fc8a177bc86fc7e68b15045ba7a791e2504f4b5cDavid Sommerseth2008-09-262-2/+8
| | | | | Make sure that eDBget_sessionkey_macaddr(...) only returns sessionkeys for sessions ready to be destroyed, ie. sessionstatus must be 3.
* BUGFIX: Made sure that eDBget_sessionkey_seed(...) only returns a sessionkey ↵David Sommerseth2008-09-262-3/+12
| | | | | | | | | | | | | | | | | | | | | | for sessions which is in open status (sessionstatus is 1 or 2). When a client does a disconnect for session_A, the status of the session is 3, as logged out but not yet deleted. In this status, the session is not deleted, nor is the record in openvpn_sessionkeys for that sessions's sessionseed. If the client then does a new reconnection (session_B) before the session is deleted, it will get the sessionkey for the session which was just logged out, session_A's sessionkey. When OpenVPN then calls the learn_address function to delete the session_A, that session will be closed. This results in that session_B will then do not match any open sessions at all, since session_A and session_B shared the sessionseed to a sessionkey. By changing the eDBget_sessionkey_seed(...) to check that the sessionstatus is 1 or 2 (open session statuses), it should generate a new sessionkey for the session_B, since no sessionkey would be returned for that sessionseed. The destruction of the session (done via eurephia_learn_address(...)) will still work, since this function uses the MAC address of the client and not the sessionseed.
* BUGFIX: changed argv[1] to argv[0] due to new parameter handling in eurephia.cDavid Sommerseth2008-09-241-3/+3
|
* Fixed some sqlite_free_result() issues - missing or incorrectly placedDavid Sommerseth2008-09-191-3/+3
|
* Updated database driver template to match the most recent needed APIDavid Sommerseth2008-09-191-281/+388
|
* Improved code security. LOG_DEBUG statements are only compiled if DEBUG=1 ↵David Sommerseth2008-09-192-41/+36
| | | | | | | | | | | | | is sent to make. Since several parts of the code where LOG_DEBUG was used with eurephia_log(...) contains security sensitive information (like logging password retrieved with get_env(...)), all debug logging is now done via the DEBUG macro. This macro will not produce any security relevant eurephia_log(...) statements unless the source is compiled with -DENABLE_DEBUG. This is activated via make by adding DEBUG=1 before the make targets. When not enabled, the binaries will not do any debug logging at all.
* Renamed openvpn_lastlog.session_del to session_deletedDavid Sommerseth2008-09-193-3/+3
|
* Added (untested) logging of time_duration into openvpn_lastlog.session_durationDavid Sommerseth2008-09-192-19/+21
|
* Added (untested) logging of VPN MAC addresses into openvpn_macaddr_historyDavid Sommerseth2008-09-192-0/+19
|
* - Renamed eDBget_sessionkey(...) to eDBget_sessionkey_seed(...)David Sommerseth2008-09-151-32/+31
| | | | | - Added eDBget_sessionkey_macaddr(...) to retrieve sessionkey based on MAC address - Changed eDBdestroy_session(...) to use eurephiaSESSION instead of MAC address string