gnome-keyring r1153 - in trunk: . daemon
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-keyring r1153 - in trunk: . daemon
- Date: Sat, 21 Jun 2008 23:58:09 +0000 (UTC)
Author: nnielsen
Date: Sat Jun 21 23:58:09 2008
New Revision: 1153
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1153&view=rev
Log:
* daemon/gkr-daemon.c: Initialize random number generator
with something a bit stronger than time().
Modified:
trunk/ChangeLog
trunk/daemon/gkr-daemon.c
Modified: trunk/daemon/gkr-daemon.c
==============================================================================
--- trunk/daemon/gkr-daemon.c (original)
+++ trunk/daemon/gkr-daemon.c Sat Jun 21 23:58:09 2008
@@ -429,10 +429,10 @@
GIOChannel *channel;
GMainContext *ctx;
gchar *login_password;
+ unsigned seed;
g_type_init ();
g_thread_init (NULL);
- srand (time (NULL));
parse_arguments (&argc, &argv);
@@ -449,6 +449,9 @@
gkr_crypto_setup ();
+ gcry_create_nonce (&seed, sizeof (seed));
+ srand (seed);
+
/* Initialize the appropriate components */
if (check_run_component ("keyring")) {
if (!gkr_daemon_io_create_master_socket ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]