diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-01-10 00:49:59 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-01-10 00:49:59 +0100 |
commit | d5c7a4c72731cc36e0e8cf4fd3a6a0811344a4d8 (patch) | |
tree | 8a9c24f5e99acf06bab383f1c798bb0a174317a5 /plugin/eurephiadb_session.c | |
parent | be9c9cab62dbfe03ff6b2a44b9eefc27e8afd0b4 (diff) | |
download | eurephia-d5c7a4c72731cc36e0e8cf4fd3a6a0811344a4d8.tar.gz eurephia-d5c7a4c72731cc36e0e8cf4fd3a6a0811344a4d8.tar.xz eurephia-d5c7a4c72731cc36e0e8cf4fd3a6a0811344a4d8.zip |
Moved eDBsessionGetRandString(...) to a more global and independent eurephia_randstring(...) function
Diffstat (limited to 'plugin/eurephiadb_session.c')
-rw-r--r-- | plugin/eurephiadb_session.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/eurephiadb_session.c b/plugin/eurephiadb_session.c index 58e93db..3b59f77 100644 --- a/plugin/eurephiadb_session.c +++ b/plugin/eurephiadb_session.c @@ -1,6 +1,6 @@ /* eurephiadb_session.c -- Functions for handling sessions from eurephia-auth * - * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net> + * GPLv2 - Copyright (C) 2008, 2009 David Sommerseth <dazo@users.sourceforge.net> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -30,6 +30,7 @@ #include "eurephia_log.h" #include "eurephiadb_session.h" #include <eurephiadb_session_common.h> +#include <randstr.h> #include "sha512.h" @@ -150,7 +151,7 @@ eurephiaSESSION *eDBopen_session_seed(eurephiaCTX *ctx, const char *digest, memset(rndstr, 0, (totlen * 2)); rndlen = ((totlen * 2) - strlen_nullsafe(seed) - 2); - if( !eDBsessionGetRandString(ctx, rndstr, rndlen) ) { + if( !eurephia_randstring(ctx, rndstr, rndlen) ) { eurephia_log(ctx, LOG_PANIC, 0, "Could not generate enough random data for session key"); free_nullsafe(new_session->sessionkey); |