Changeset 5959:b568f7b84e08 in roaraudio
- Timestamp:
- 01/04/14 05:16:50 (10 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r5958 r5959 9 9 * Added support for setting a default device for roard at compile time. 10 10 * Removed OpenSSL support (See: #366) 11 * Also use uname() and hostid for seeding nonce generator. 11 12 12 13 v. 1.0beta10 - Tue Oct 15 2013 12:03 CEST -
libroar/config.c
r5895 r5959 70 70 } 71 71 72 roar_random_salt_nonce(&config, sizeof(config)); 73 72 74 inited++; 73 75 } … … 345 347 } 346 348 } 349 350 roar_random_salt_nonce(&config, sizeof(config)); 347 351 348 352 return 0; -
libroar/random.c
r5823 r5959 38 38 #ifdef ROAR_HAVE_LIBGCRYPT 39 39 #include <gcrypt.h> 40 #endif 41 42 #ifdef ROAR_HAVE_UNAME 43 #include <sys/utsname.h> 40 44 #endif 41 45 … … 71 75 volatile uint32_t now = time(NULL); 72 76 #endif 77 #ifdef ROAR_HAVE_UNAME 78 static struct utsname utsname; 79 #endif 73 80 74 81 roar_random_init(); … … 90 97 roar_hash_buffer(off+TIGER_DIGESTLEN, buf, TIGER_BLOCKLEN, ROAR_HT_TIGER); 91 98 99 // init is now done: 92 100 inited = 1; 101 102 // do additional seeding: 103 104 #ifdef ROAR_HAVE_UNAME 105 if ( uname(&utsname) == 0 ) { 106 roar_random_salt_nonce(&utsname, sizeof(utsname)); 107 } 108 #endif 93 109 } 94 110 -
libroar/serverinfo.c
r5825 r5959 123 123 #ifdef ROAR_HAVE_GETHOSTID 124 124 hostid = gethostid(); 125 roar_random_salt_nonce(&hostid, sizeof(hostid)); 125 126 snprintf(hostidbuf, _HOSTID_BUFLEN, sizeof(long) == 8 ? "0x%.16lx" : "0x%.8lx", hostid); 126 127 ret->hostid = hostidbuf; … … 131 132 #ifdef ROAR_HAVE_UNAME 132 133 if ( !utsname_inited ) 133 if ( uname(&utsname) == 0 ) 134 if ( uname(&utsname) == 0 ) { 134 135 utsname_inited = 1; 136 roar_random_salt_nonce(&utsname, sizeof(utsname)); 137 } 135 138 136 139 if ( utsname_inited ) { -
roard/req.c
r5826 r5959 817 817 #ifdef ROAR_HAVE_UNAME 818 818 if ( uname(&utsname) == 0 ) { 819 roar_random_salt_nonce(&utsname, sizeof(utsname)); 819 820 info.un.sysname = utsname.sysname; 820 821 info.un.release = utsname.release;
Note: See TracChangeset
for help on using the changeset viewer.