| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Auto-logout implemented as well
|
| |
|
|
|
|
|
|
| |
Follow up of commit 103acd7c2e1467401f0795930be9140dc5ed47ff. Seems
to work fine via both plugin mode and eurephiadm, regarding core dumping
too.
|
|
|
|
| |
(*eDBstore_session_value)(...)
|
|
|
|
|
|
| |
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.
|
|\ |
|
| |
| |
| |
| | |
if config parameters is not set
|
| | |
|
| | |
|
| |
| |
| |
| | |
context type.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
Moved eurephiadb_session_struct.h to the common directory and
made sure that eurephiadb_session.h is only included where needed
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
separate include files
|
| |
|
|
|
|
| |
calling sqlite_get_value(...) once again
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| | |
Also differentiated log level from user certs (depth == 0) and other depths.
|
|\| |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| |
| | |
- Added checks for external libraries that we use
- Linking now links in needed shared libraries
- Added better check if OPENVPN_SRC_DIR is set
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Make sure that eDBget_sessionkey_macaddr(...) only returns sessionkeys for
sessions ready to be destroyed, ie. sessionstatus must be 3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- Added eDBget_sessionkey_macaddr(...) to retrieve sessionkey based on MAC address
- Changed eDBdestroy_session(...) to use eurephiaSESSION instead of MAC address string
|