~svn/ubuntu/oneiric/subversion/ppa

« back to all changes in this revision

Viewing changes to debian/patches/entropy

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-12-13 17:57:16 UTC
  • mfrom: (1.1.6 upstream) (0.1.3 etch)
  • Revision ID: james.westby@ubuntu.com-20061213175716-2ysv6z4w5dpa2r2f
Tags: 1.4.2dfsg1-2ubuntu1
* Merge with Debian unstable; remaining changes:
  - Create pot file on build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
##
 
3
## entropy by <troyh@debian.org>
 
4
##
 
5
## DP: Changing the default behavior to not use apr_generate_random_bytes(), Debian use
 
6
## DP: the system APR which is configured to use /dev/random. In cases where the
 
7
## DP: entropy pool is drained svn commands can block waiting. Moving to the fallback
 
8
## DP: of using time. (Closes: #285708, #298822) 
 
9
 
 
10
@DPATCH@
 
11
diff -urN a/subversion/libsvn_ra_svn/cram.c b/subversion/libsvn_ra_svn/cram.c
 
12
--- a/subversion/libsvn_ra_svn/cram.c 2004-11-13 12:27:22.000000000 -0700
 
13
+++ b/subversion/libsvn_ra_svn/cram.c 2005-11-08 10:59:14.000000000 -0700
 
14
@@ -118,12 +118,8 @@
 
15
  * should prevent replay attacks in practice. */
 
16
 static apr_status_t make_nonce(apr_uint64_t *nonce)
 
17
 {
 
18
-#if APR_HAS_RANDOM
 
19
-  return apr_generate_random_bytes((unsigned char *) nonce, sizeof(*nonce));
 
20
-#else
 
21
   *nonce = apr_time_now();
 
22
   return APR_SUCCESS;
 
23
-#endif
 
24
 }
 
25
 
 
26
 svn_error_t *svn_ra_svn_cram_server(svn_ra_svn_conn_t *conn, apr_pool_t *pool,