diff options
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
-rw-r--r-- | lisp/gnus/gnus-sync.el | 2 | ||||
-rw-r--r-- | lisp/gnus/message.el | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index b3aeb96e9fe..a4e3d9bde2b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,10 @@ +2012-09-01 Paul Eggert <eggert@cs.ucla.edu> + + Better seeds for (random). + * gnus-sync.el (gnus-sync-lesync-setup): + * message.el (message-canlock-generate, message-unique-id): + Change (random t) to (random), now that the latter is more random. + 2012-08-31 Dave Abrahams <dave@boostpro.com> * auth-source.el (auth-sources): Fix macos keychain access. diff --git a/lisp/gnus/gnus-sync.el b/lisp/gnus/gnus-sync.el index 15d94810c3a..ca8662ff936 100644 --- a/lisp/gnus/gnus-sync.el +++ b/lisp/gnus/gnus-sync.el @@ -225,7 +225,7 @@ When SALT is nil, a random one will be generated using `random'." (security-object (concat url "/_security")) (user-record `((names . [,user]) (roles . []))) (couch-user-name (format "org.couchdb.user:%s" user)) - (salt (or salt (sha1 (format "%s" (random t))))) + (salt (or salt (sha1 (format "%s" (random))))) (couch-user-record `((_id . ,couch-user-name) (type . user) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 8fd89b1742c..18088423eb0 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4820,9 +4820,7 @@ Do not use this for anything important, it is cryptographically weak." (require 'sha1) (let (sha1-maximum-internal-length) (sha1 (concat (message-unique-id) - (format "%x%x%x" (random) - (progn (random t) (random)) - (random)) + (format "%x%x%x" (random) (random) (random)) (prin1-to-string (recent-keys)) (prin1-to-string (garbage-collect)))))) @@ -5525,7 +5523,6 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'." ;; You might for example insert a "." somewhere (not next to another dot ;; or string boundary), or modify the "fsf" string. (defun message-unique-id () - (random t) ;; Don't use microseconds from (current-time), they may be unsupported. ;; Instead we use this randomly inited counter. (setq message-unique-id-char |