| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
eurephiadm is now able to authenticate, login and logout a user.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
| |
This is to restrict the eurephia-admin database user to only be
allowed to update a few fields of the eurephia_adminlog table.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
|
|
| |
statment
Without this break, this function would return an error that the web or console
admin interface were invalid.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
| |
This is used to add a single char value to the prepared arguments stack.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
| |
Aslo moved one query from the "plugin section" to the "admin section" where
it belongs.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
|
| |
This will parse the database result value as a boolean value and
return (int) 1 if the value is 't' (true in PostgreSQL). Otherwise
the function will return (int) 0.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
| |
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrote the loading of prepared statements to be able to switch
which statements are loaded, based on the eurephia context type.
This ensures that the database connection for the OpenVPN connection
will not have any prepared statements related to the administration
queries.
With this change, it also made sense to replace the
ePGprepStatementGetID() function with ePGprepGetStatement() which
returns a pointer directly to related statement, instead of looking
up the "slot ID" for the requested statement.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
|
|
|
| |
Moved all SQL statements out of each function and into a const
struct which is loaded at startup.
Implemented a safer way of handling parameters to these prepared
statements as well.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
|
|
| |
This is a working implementation of the PostgreSQL driver, where only the
driver functions needed by OpenVPN for authentication are implemented.
There are still more enhancements to be done, but this is usable.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
| |
This allows the eurephia-auth user to only update the columns
in the lastlog which it is supposed to update.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
| |
The macaddr_history table was declared with a too small field for
storing session keys.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
| |
PostgreSQL have a better data type for storing session duration.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
| |
None of the tables used by the edb-pgsql driver uses the
'openvpn_' prefix
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
|
| |
It's not ideal to let the eurephia-auth user have write access to the
users table. This view will allow the eurephia-auth user only to touch
users.last_accessed; and this value will be enforced to be CURRENT_TIMESTAMP.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
|
| |
Generic local PostgreSQL functions were prefixed with 'PG'. As this
is too close to the prefix PostgreSQL uses, these functions where changed
to 'ePG'.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
| |
Added a generic error reporting function, to stream line this process.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
|
|
|
| |
eDBblacklist_check()
PGgetValue() will return NULL if the database field is NULL, which is
expected several places in the eDBblacklist_check() function.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
|
|
This is far from production ready, but is the first step. Only
tested with initialisation and startup of OpenVPN so far.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|