# HG changeset patch # User Matt Johnston # Date 1341065548 -28800 # Node ID 650c41a4909a27578a5533a597058ac6bce25496 # Parent 167fdc091c05429a3bc2a81e76c5b2b6ac381b7a Add a few more files in /proc for Linux diff -r 167fdc091c05 -r 650c41a4909a random.c --- a/random.c Fri Jun 29 23:19:43 2012 +0800 +++ b/random.c Sat Jun 30 22:12:28 2012 +0800 @@ -205,10 +205,18 @@ /* A few other sources to fall back on. Add more here for other platforms */ #ifdef __linux__ - /* Seems to be a reasonable source of entropy from timers */ + /* Seems to be a reasonable source of entropy from timers. Possibly hard + * for even local attackers to reproduce */ process_file(&hs, "/proc/timer_list", 0, 0); /* Might help on systems with wireless */ process_file(&hs, "/proc/interrupts", 0, 0); + + /* Mostly network visible but useful in some situations */ + process_file(&hs, "/proc/net/netstat", 0, 0); + process_file(&hs, "/proc/net/dev", 0, 0); + process_file(&hs, "/proc/net/tcp", 0, 0); + /* Also includes interface lo */ + process_file(&hs, "/proc/net/rt_cache", 0, 0); #endif pid = getpid();