summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-23 18:46:35 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-23 18:46:35 +0200
commit81fabeff2dc51c043da19cd095175c4951f527b6 (patch)
tree1e313219616fc4c09dc888fe6e3c60982877e767 /source3/passdb
parentd70efa57ceae1011a6a55d57d0152fd1bc2bb192 (diff)
downloadsamba-81fabeff2dc51c043da19cd095175c4951f527b6.tar.gz
samba-81fabeff2dc51c043da19cd095175c4951f527b6.tar.bz2
samba-81fabeff2dc51c043da19cd095175c4951f527b6.zip
Use libutil genrand.
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/secrets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index a6adb904e2..8e64a49e22 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -40,7 +40,7 @@ bool global_machine_password_needs_changing;
*
* @note Not called by systems with a working /dev/urandom.
*/
-static void get_rand_seed(int *new_seed)
+static void get_rand_seed(void *userdata, int *new_seed)
{
*new_seed = sys_getpid();
if (db_ctx) {
@@ -81,7 +81,7 @@ bool secrets_init(void)
* This avoids a problem where systems without /dev/urandom
* could send the same challenge to multiple clients
*/
- set_rand_reseed_callback(get_rand_seed);
+ set_rand_reseed_callback(get_rand_seed, NULL);
/* Ensure that the reseed is done now, while we are root, etc */
generate_random_buffer(&dummy, sizeof(dummy));