summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/eurephia.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugin/eurephia.c b/plugin/eurephia.c
index e41a0dc..620e6e6 100644
--- a/plugin/eurephia.c
+++ b/plugin/eurephia.c
@@ -145,7 +145,7 @@ eurephiaCTX *eurephiaInit(const char const **argv, const char const **envp)
" (David Sommerseth (C) 2008-2012 GPLv2)");
// Load the database driver
- if( (error == 0) && eDBlink_init(ctx, dbi, 3) ) {
+ if( (error == 0) && eDBlink_init(ctx, dbi, 4) ) {
// Connect to the database
if( !eDBconnect(ctx, dbargc, dbargv) ) {
eurephia_log(ctx, LOG_PANIC, 0, "Could not connect to the database");
@@ -503,7 +503,7 @@ int eurephia_connect(eurephiaCTX *ctx, const char **env) {
eurephiaSESSION *session = NULL;
char *digest, *cname, *uname, *vpnipaddr, *vpnipmask, *remipaddr, *remport,
*proto, *tlsid;
- int certid = 0, uid = 0, ret = 0;
+ int certid = 0, uid = 0, accprofile = -1, ret = 0;
certinfo *ci = NULL;
DEBUG(ctx, 10, "** Function call: eurephia_connect(...)");
@@ -553,9 +553,10 @@ int eurephia_connect(eurephiaCTX *ctx, const char **env) {
free_certinfo(ci);
// Register the session login
- ret = eDBregister_login(ctx, session, certid, uid, proto, remipaddr, remport, vpnipaddr, vpnipmask);
+ accprofile = eDBget_accessprofile(ctx, uid, certid);
+ ret = eDBregister_login2(ctx, session, certid, accprofile, uid, proto, remipaddr, remport);
eDBfree_session(ctx, session);
- eurephia_log(ctx, LOG_INFO, 1, "User '%s' logged in", uname);
+ eurephia_log(ctx, LOG_INFO, 1, "User '%s' connected", uname);
free_nullsafe(ctx, proto);
free_nullsafe(ctx, remport);