Initialize RNG in maxkeys/maxpasswd
The initialization needs to be done in each of the executables before the random number generator is used.
This commit is contained in:
parent
99edaf6b56
commit
f54c0a5b81
@ -29,6 +29,7 @@
|
||||
|
||||
#include <maxscale/log_manager.h>
|
||||
#include <maxscale/paths.h>
|
||||
#include <maxscale/random_jkiss.h>
|
||||
|
||||
struct option options[] =
|
||||
{
|
||||
@ -94,6 +95,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
mxs_log_init(NULL, NULL, MXS_LOG_TARGET_DEFAULT);
|
||||
random_jkiss_init();
|
||||
|
||||
if (secrets_write_keys(directory) != 0)
|
||||
{
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
#include <maxscale/paths.h>
|
||||
#include <maxscale/log_manager.h>
|
||||
#include <maxscale/random_jkiss.h>
|
||||
|
||||
#include "maxscale/secrets.h"
|
||||
|
||||
@ -154,6 +155,8 @@ int main(int argc, char **argv)
|
||||
mxs_log_set_priority_enabled(LOG_INFO, false);
|
||||
mxs_log_set_priority_enabled(LOG_DEBUG, false);
|
||||
|
||||
random_jkiss_init();
|
||||
|
||||
size_t len = strlen(password);
|
||||
|
||||
if (len > MXS_PASSWORD_MAXLEN)
|
||||
|
Loading…
x
Reference in New Issue
Block a user