Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| 9c8db0f8 | 2010-09-23 22:45:55 | Fix all warnings in the main codebase flagged by -Wsigned-compare Remember, the code int is_less_than(int a, unsigned b) { return a < b; } is buggy, since the C integer promotion rules basically turn it into int is_less_than(int a, unsigned b) { return ((unsigned)a) < b; } and we really want something closer to int is_less_than(int a, unsigned b) { return a < 0 || ((unsigned)a) < b; } . Suggested by an example from Ralph Castain | ||
| c44de06c | 2010-05-08 18:09:27 | Numerous opensolaris compilation fixes For future note, opensolaris doesn't have sys/sysctl.h, doesn't like comparing iov_buf to a chain_space_ptr without a cast, and is (predictably) unforgiving of dumb syntax errors. Also, we had accidentally broken the devpoll backend test in configure.in | ||
| 90d42251 | 2010-05-08 15:31:54 | Fix some crazy macro mistakes in arc4random.c | ||
| 20fda296 | 2010-05-03 13:00:00 | Try /proc on Linux as entropy fallback; use sysctl as last resort It turns out that the happy fun Linux kernel is deprecating sysctl, and using sysctl to fetch entropy will spew messages in the kernel logs. Let's not do that. Instead, let's call sysctl for our entropy only when all other means fail. Additionally, let's add another means, and try /proc/sys/kernel/random/uuid if /dev/urandom fails. | ||
| a47a4b7e | 2010-04-23 16:08:09 | Fix a couple of bugs in the BSD sysctl arc4seed logic Of course, FreeBSD has its own arc4random() implementation, so this should never actually be needed. Still, it's good to paint the underside of the wagon. | ||
| 71fc3eb0 | 2010-03-04 01:13:51 | Seed the RNG using sysctl() as well as /dev/urandom William Ahern points out that if the user has chrooted, they might not have a working /dev/urandom. Linux and many of the BSDs, however, define a sysctl interface to their kernel random number generators. This patch takes a belt-and-suspenders approach and tries to do use the sysctl _and_ the /dev/urandom approach if both are present. When using the sysctl approach, it tries to bulletproof itself by checking to make sure that the buffers are actually set by the sysctl calls. | ||
| 98edb891 | 2010-02-25 17:14:41 | Fix arc4random compilation on MSVC. | ||
| ff2a134d | 2010-02-18 00:54:44 | Fix getpid() usage on Windows On Windows, getpid() is _getpid(), and requires that we first include <process.h>. arc4random.c previously didn't know that. Actually, I question whether arc4random needs to do its getpid() tricks on Windows. They exist only so that we remember to re-seed the ARC4 cipher whenever we fork... but Windows has no fork(), so I think we're in the clear. | ||
| 4ec8fea6 | 2010-02-13 00:11:44 | Make RNG work when we have arc4random() but not arc4random_buf() | ||
| d4de062e | 2010-02-10 17:19:18 | Add an arc4random implementation for use by evdns Previously, evdns was at the mercy of the user for providing a good entropy source; without one, it would be vulnerable to various active attacks. This patch adds a port of OpenBSD's arc4random() calls to Libevent [port by Chris Davis], and wraps it up a little bit so we can use it more safely. |